From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 615373856DE6; Mon, 31 Jul 2023 12:00:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 615373856DE6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1690804813; bh=OhTHMmjJqNNHduKJU3Gshq3UOAq4PGTZPhGPikBiRlY=; h=From:To:Subject:Date:From; b=idJQOXIqGBIJW2V+Wqa6Jb4DxLho4mzOvAHwbq5e635Y5tl1CLlcsgDI0qScF/L2T TCyeD/2cKSDx3xuxXlh0PCONP7LMpuN7jjFK2hPeJRzvdlNq7AiB3ppfGorD54s+iy SutmKr5alizBnzBEHO9ZTn4veQxf5rnvd8supTdQ= From: "sihan2021 at iscas dot ac.cn" To: gdb-prs@sourceware.org Subject: [Bug gdb/30706] New: dynamic-stack-buffer-overflow /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/ada-lang.c:1391 in ada_decode[abi:cxx11](char const*, bool, bool) Date: Mon, 31 Jul 2023 12:00:12 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 13.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sihan2021 at iscas dot ac.cn 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 attachments.created 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30706 Bug ID: 30706 Summary: dynamic-stack-buffer-overflow /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/ada-l ang.c:1391 in ada_decode[abi:cxx11](char const*, bool, bool) Product: gdb Version: 13.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: sihan2021 at iscas dot ac.cn Target Milestone: --- Created attachment 15026 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D15026&action=3Ded= it crash seed Hello, developers of gdb, we recently ran some fuzz on gdb 13.1 and find a stack-buffer-overflow bug. Here is the description of this bug. I hope this can accsit you to solve this bug. Version: gdb 13.1 (compile with ASAN)=20 ubuntu 20.04 Command to reproduce: gdb dsbo ASAN report: =3D=3D3117258=3D=3DERROR: AddressSanitizer: dynamic-stack-buffer-overflow o= n address 0x7ffd4744605f at pc 0x55c23d0564a0 bp 0x7ffd47445bc0 sp 0x7ffd47445bb0 READ of size 1 at 0x7ffd4744605f thread T0 #0 0x55c23d05649f in ada_decode[abi:cxx11](char const*, bool, bool) /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/ada-lang.c:1391 #1 0x55c23d099aff in ada_language::sniff_from_mangled_name(char const*, std::unique_ptr >*) const (/home/root/gdb/binutils-gdb-gdb-13.1-release/install/bin/gdb+0xba3aff) #2 0x55c23de773b7 in symbol_find_demangled_name(general_symbol_info*, c= har const*) /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/symtab.c:892 #3 0x55c23de77c84 in general_symbol_info::compute_and_set_names(gdb::basic_string_view >, bool, objfile_per_bfd_storage*, gdb::optional) /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/symtab.c:980 #4 0x55c23d3b7927 in process_coff_symbol /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/coffread.c:1572 #5 0x55c23d3b55b0 in coff_symtab_read /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/coffread.c:1184 #6 0x55c23d3b1da4 in coff_read_minsyms /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/coffread.c:554 #7 0x55c23d3b2c07 in coff_symfile_read /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/coffread.c:703 #8 0x55c23de3e421 in read_symbols /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/symfile.c:773 #9 0x55c23de3f38a in syms_from_objfile_1 /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/symfile.c:968 #10 0x55c23de3f5f9 in syms_from_objfile /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/symfile.c:985 #11 0x55c23de404f6 in symbol_file_add_with_addrs /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/symfile.c:1088 #12 0x55c23de411fd in symbol_file_add_from_bfd(gdb::ref_ptr const&, char const*, enum_flags, std::vector >*, enum_flags, objfile*) /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/symfile.c:1168 #13 0x55c23de413a2 in symbol_file_add(char const*, enum_flags, std::vector >*, enum_flags) /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/symfile.c:1181 #14 0x55c23de4170c in symbol_file_add_main_1 /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/symfile.c:1205 #15 0x55c23de41558 in symbol_file_add_main(char const*, enum_flags) /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/symfile.c:1196 #16 0x55c23d9cb8cf in symbol_file_add_main_adapter /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/main.c:540 #17 0x55c23d9cb6bf in catch_command_errors /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/main.c:513 #18 0x55c23d9ce58a in captured_main_1 /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/main.c:1213 #19 0x55c23d9cf48f in captured_main /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/main.c:1320 #20 0x55c23d9cf530 in gdb_main(captured_main_args*) /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/main.c:1345 #21 0x55c23cff8eb1 in main /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/gdb.c:32 #22 0x7f08cb9e3082 in __libc_start_main ../csu/libc-start.c:308 #23 0x55c23cff8c8d in _start (/home/root/gdb/binutils-gdb-gdb-13.1-release/install/bin/gdb+0xb02c8d) Address 0x7ffd4744605f is located in stack of thread T0 at offset 191 in fr= ame #0 0x55c23de7712e in symbol_find_demangled_name(general_symbol_info*, c= har const*) /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/symtab.c:872 This frame has 1 object(s): [32, 40) 'demangled' (line 873) <=3D=3D Memory access at offset 191 ove= rflows this variable HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: dynamic-stack-buffer-overflow /home/root/gdb/binutils-gdb-gdb-13.1-release/gdb/ada-lang.c:1391 in ada_decode[abi:cxx11](char const*, bool, bool) Shadow bytes around the buggy address: 0x100028e80bb0: f2 f2 f2 f2 00 00 00 00 f2 f2 f2 f2 00 00 00 00 0x100028e80bc0: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 0x100028e80bd0: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 f3 f3 f3 f3 0x100028e80be0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x100028e80bf0: 00 00 00 00 f1 f1 f1 f1 00 f3 f3 f3 00 00 00 00 =3D>0x100028e80c00: 00 00 00 00 00 00 00 00 ca ca ca[ca]03 cb cb cb 0x100028e80c10: cb cb cb cb 00 00 00 00 00 00 00 00 00 00 00 00 0x100028e80c20: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 0x100028e80c30: f1 f1 f8 f2 00 f2 f2 f2 00 f2 f2 f2 00 00 f2 f2 0x100028e80c40: f8 f8 f2 f2 00 00 f2 f2 00 00 f2 f2 00 00 f2 f2 0x100028e80c50: 00 00 00 00 f3 f3 f3 f3 00 00 00 00 00 00 00 00 --=20 You are receiving this mail because: You are on the CC list for the bug.=