public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug cli/28665] New: CLI commands that cause crash
@ 2021-12-07 11:01 gosebam at gmail dot com
  2021-12-07 12:17 ` [Bug cli/28665] " aburgess at redhat dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: gosebam at gmail dot com @ 2021-12-07 11:01 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 28665
           Summary: CLI commands that cause crash
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: cli
          Assignee: unassigned at sourceware dot org
          Reporter: gosebam at gmail dot com
  Target Milestone: ---

Hey , I found a command that crashes gdb and decided to fuzz for more.

crash:
Fatal signal: Segmentation fault
----- Backtrace -----
0x56016993c083 gdb_internal_backtrace_1
        /home/user/git/binutils-gdb/gdb/bt-utils.c:121
0x56016993c083 _Z22gdb_internal_backtracev
        /home/user/git/binutils-gdb/gdb/bt-utils.c:164
0x560169d15bb8 handle_fatal_signal
        /home/user/git/binutils-gdb/gdb/event-top.c:896
0x560169d16049 handle_sigsegv
        /home/user/git/binutils-gdb/gdb/event-top.c:969
0x7fb10759197f ???
       
/build/glibc-S9d2JN/glibc-2.27/nptl/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x7fb10607b47c ???
0x560169f3fe0d startswith
        ../bfd/bfd.h:544
0x560169f3fe0d _Z15is_ada_operatorPKc
        /home/user/git/binutils-gdb/gdb/linespec.c:548
0x560169f54a58 parse_linespec
        /home/user/git/binutils-gdb/gdb/linespec.c:2541
0x560169f57548 event_location_to_sals
        /home/user/git/binutils-gdb/gdb/linespec.c:3173
0x560169f5b7ef _Z13decode_line_1PK14event_locationiP13program_spaceP6symtabi
        /home/user/git/binutils-gdb/gdb/linespec.c:3307
0x5601699e50ca list_command
        cli/cli-cmds.c:1242
0x5601699f5640 _Z8cmd_funcP16cmd_list_elementPKci
        cli/cli-decode.c:2481
0x56016a587265 _Z15execute_commandPKci
        /home/user/git/binutils-gdb/gdb/top.c:670
0x560169d17b3b _Z15command_handlerPKc
        /home/user/git/binutils-gdb/gdb/event-top.c:597
0x56016a00d612 captured_main
        /home/user/git/binutils-gdb/gdb/main.c:1350
0x56016a00d612 _Z8gdb_mainP18captured_main_args
        /home/user/git/binutils-gdb/gdb/main.c:1375
0x560169715a72 main
        /home/user/git/binutils-gdb/gdb/gdb.c:32
---------------------
A fatal error internal to GDB has been detected, further
debugging is not possible.  GDB will now terminate.

This is a bug, please report it.  For instructions, see:
<https://www.gnu.org/software/gdb/bugs/>.

Segmentation fault

Steps to reproduce:
```
gdb ~/Downloads/test
list task 123

Segmentation fault
```

While fuzzing for more I found that gdb crashes with non-ASCII inputs like
these (hex representation):

0000000 2c6c 552c                              
0000004

0000000 6c63 202c 2020 89af 8989 2030 003e     
000000d

0000000 6465 000d                              
0000003


it seems like all of these inputs yield to the same root cause.

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

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

end of thread, other threads:[~2022-02-02 16:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-07 11:01 [Bug cli/28665] New: CLI commands that cause crash gosebam at gmail dot com
2021-12-07 12:17 ` [Bug cli/28665] " aburgess at redhat dot com
2021-12-07 16:03 ` simark at simark dot ca
2021-12-07 23:25 ` aburgess at redhat dot com
2022-02-02 16:27 ` cvs-commit at gcc dot gnu.org
2022-02-02 16:28 ` cvs-commit at gcc dot gnu.org
2022-02-02 16:28 ` cvs-commit at gcc dot gnu.org
2022-02-02 16:28 ` cvs-commit at gcc dot gnu.org
2022-02-02 16:30 ` aburgess at redhat dot com

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).