googleprojectzero / SockFuzzer

Other
356 stars 47 forks source link

Compiled in Ubuntu20.04,got global-buffer-overflow in kernel_startup_bootstrap.It should be false positve report. #4

Open fatgrass opened 2 years ago

fatgrass commented 2 years ago

================================================================= ==882421==ERROR: AddressSanitizer: global-buffer-overflow on address 0x0000015021f8 at pc 0x000000f8bb2d bp 0x7fff205d4b60 sp 0x7fff205d4b58 READ of size 4 at 0x0000015021f8 thread T0

0 0xf8bb2c in startup_entry_cmp /home/test/Downloads/tmp/SockFuzzer-main/build/../third_party/xnu/osfmk/kern/startup.c:259:25

#1 0x50af5b in qsort (/home/test/Downloads/SockFuzzer-main/build/net_fuzzer+0x50af5b)
#2 0xf8bc01 in kernel_startup_bootstrap /home/test/Downloads/tmp/SockFuzzer-main/build/../third_party/xnu/osfmk/kern/startup.c:287:2
#3 0xd1f082 in initialize_network /home/test/Downloads/tmp/SockFuzzer-main/build/../fuzz/api/backend.c:143:3
#4 0xd3446a in TestOneProtoInput(Session const&) /home/test/Downloads/tmp/SockFuzzer-main/build/../fuzz/net_fuzzer.cc:670:5
#5 0xd33a88 in LLVMFuzzerTestOneInput /home/test/Downloads/tmp/SockFuzzer-main/build/../fuzz/net_fuzzer.cc:665:1
#6 0x464961 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) (/home/test/Downloads/SockFuzzer-main/build/net_fuzzer+0x464961)
#7 0x46669a in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) (/home/test/Downloads/SockFuzzer-main/build/net_fuzzer+0x46669a)
#8 0x466d29 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) (/home/test/Downloads/SockFuzzer-main/build/net_fuzzer+0x466d29)
#9 0x4559fe in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) (/home/test/Downloads/SockFuzzer-main/build/net_fuzzer+0x4559fe)
#10 0x47e842 in main (/home/test/Downloads/SockFuzzer-main/build/net_fuzzer+0x47e842)
#11 0x7fb5fdf960b2 in __libc_start_main /build/glibc-sMfBJT/glibc-2.31/csu/../csu/libc-start.c:308:16
#12 0x42a79d in _start (/home/test/Downloads/SockFuzzer-main/build/net_fuzzer+0x42a79d)

0x0000015021f8 is located 40 bytes to the left of global variable 'startup_LOCKS_EARLY_entry_lck_grp_startup_init_133' defined in '../third_party/xnu/bsd/kern/kern_control.c:133:8' (0x1502220) of size 24 0x0000015021f8 is located 0 bytes to the right of global variable 'startup_LOCKS_EARLY_entry_lck_attr_startup_init_132' defined in '../third_party/xnu/bsd/kern/kern_control.c:132:8' (0x15021e0) of size 24 SUMMARY: AddressSanitizer: global-buffer-overflow /home/test/Downloads/tmp/SockFuzzer-main/build/../third_party/xnu/osfmk/kern/startup.c:259:25 in startup_entry_cmp Shadow bytes around the buggy address: 0x0000802983e0: f9 f9 f9 f9 00 00 00 f9 f9 f9 f9 f9 06 f9 f9 f9 0x0000802983f0: f9 f9 f9 f9 00 00 00 f9 f9 f9 f9 f9 00 03 f9 f9 0x000080298400: f9 f9 f9 f9 00 00 00 f9 f9 f9 f9 f9 00 04 f9 f9 0x000080298410: f9 f9 f9 f9 00 00 00 f9 f9 f9 f9 f9 00 03 f9 f9 0x000080298420: f9 f9 f9 f9 00 00 00 f9 f9 f9 f9 f9 03 f9 f9 f9 =>0x000080298430: f9 f9 f9 f9 00 00 00 f9 f9 f9 f9 f9 00 00 00[f9] 0x000080298440: f9 f9 f9 f9 00 00 00 f9 f9 f9 f9 f9 00 00 00 f9 0x000080298450: f9 f9 f9 f9 00 00 00 f9 f9 f9 f9 f9 00 00 00 f9 0x000080298460: f9 f9 f9 f9 00 00 00 f9 f9 f9 f9 f9 00 00 00 f9 0x000080298470: f9 f9 f9 f9 00 00 00 f9 f9 f9 f9 f9 00 00 00 f9 0x000080298480: f9 f9 f9 f9 00 00 00 f9 f9 f9 f9 f9 00 00 00 f9 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==882421==ABORTING MS: 0 ; base unit: 0000000000000000000000000000000000000000