This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FYI: put a QUIT in DWARF expression evaluator


Sorry about the delay on this.

Tom> Today I wondered what would happen if I modified pr10770.c to fail,
Tom> causing an infinite loop while evaluating a DWARF expression.  The
Tom> answer is that gdb hangs and I had to kill it from the shell.
Tom> [...]
Tom> FWIW, as far as I know, no such DWARF has ever been found in the wild.

Frank> But perhaps other non-interactive services that rely on gdb to do
Frank> backtraces (pstack?)  could be tricked into looping indefinitely.  To
Frank> what extent is gdb vulnerable to specially crafted target memory state
Frank> causing indefinitely-long processing?

I wouldn't trust it, that's for sure.  I don't know of specific bugs,
but dwarf2read is simply too large and complicated for me to believe
that it is free of problems.

I would not be averse to putting a large-enough artificial limit on the
expression evaluator.  It is hard to imagine a legitimate DWARF
expression needing more than 1000 operations or something like that.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]