From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6E6843858C60; Tue, 7 Dec 2021 11:01:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6E6843858C60 From: "gosebam at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug cli/28665] New: CLI commands that cause crash Date: Tue, 07 Dec 2021 11:01:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: cli X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: gosebam at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Dec 2021 11:01:38 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28665 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 ??? =20=20=20=20=20=20=20 /build/glibc-S9d2JN/glibc-2.27/nptl/../sysdeps/unix/sysv/linux/x86_64/sigac= tion.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: . 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=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 0000004 0000000 6c63 202c 2020 89af 8989 2030 003e=20=20=20=20=20 000000d 0000000 6465 000d=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20 0000003 it seems like all of these inputs yield to the same root cause. --=20 You are receiving this mail because: You are on the CC list for the bug.=