public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/27157] New: assert + jump to NULL (segfault) if HOME or XDG_CACHE_HOME variable is empty
@ 2021-01-07 16:48 sourcewarebugz at kyber dot fi
  2021-01-07 16:55 ` [Bug gdb/27157] " sourcewarebugz at kyber dot fi
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: sourcewarebugz at kyber dot fi @ 2021-01-07 16:48 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=27157

            Bug ID: 27157
           Summary: assert + jump to NULL (segfault) if HOME or
                    XDG_CACHE_HOME variable is empty
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: sourcewarebugz at kyber dot fi
  Target Milestone: ---

gdb has two bugs: 

1. Empty HOME or XDG_CACHE_HOME variable is considered an error in
get_standard_cache_dir() due to gdb_abspath() asserting on empty path.

2. Due to some missing initialization or missing NULL checks, NULL
ui->call_readline is called in stdin_event_handler().

To PoC this crash, try this with HEAD gdb build:

HOME= gdb

or

XDG_CACHE_HOME= gdb

This will result in a segfault due to jump to address 0.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-01-08 18:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-07 16:48 [Bug gdb/27157] New: assert + jump to NULL (segfault) if HOME or XDG_CACHE_HOME variable is empty sourcewarebugz at kyber dot fi
2021-01-07 16:55 ` [Bug gdb/27157] " sourcewarebugz at kyber dot fi
2021-01-07 20:25 ` andrew.burgess at embecosm dot com
2021-01-07 20:57 ` simark at simark dot ca
2021-01-07 20:59 ` simark at simark dot ca
2021-01-08 18:47 ` cvs-commit at gcc dot gnu.org
2021-01-08 18:53 ` simark at simark dot ca

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).