syzbot


netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize

Status: fixed on 2021/05/31 08:54
Reported-by: syzbot+91187f4e33436ce83e56@syzkaller.appspotmail.com
Fix commit: d5b984e0de7e avoid dereferencing a constant string address as a UINT32 pointer, KUBSAN complains about bad alignment.
First crash: 1276d, last: 1270d

Sample crash report:
[   1.0000030] panic: UBSan: Undefined Behavior in /syzkaller/managers/ci2-netbsd-kubsan/kernel/sys/external/bsd/acpica/dist/namespace/nsaccess.c:146:19, load of misaligned address 0xffffffff840825e2 for type 'UINT32' which requires 4 byte alignment

[   1.0000030] cpu0: Begin traceback...
[   1.0000030] vpanic() at netbsd:vpanic+0x2d0 sys/kern/subr_prf.c:290
[   1.0000030] isAlreadyReported() at netbsd:isAlreadyReported
[   1.0000030] HandleTypeMismatch() at netbsd:HandleTypeMismatch+0xfc sys/../common/lib/libc/misc/ubsan.c:432
[   1.0000030] AcpiNsRootInitialize() at netbsd:AcpiNsRootInitialize+0x6fb sys/external/bsd/acpica/dist/namespace/nsaccess.c:146
[   1.0000030] AcpiInitializeSubsystem() at netbsd:AcpiInitializeSubsystem+0x77 sys/external/bsd/acpica/dist/utilities/utxfinit.c:119
[   1.0000030] acpi_probe() at netbsd:acpi_probe+0x44 sys/dev/acpi/acpi.c:273
[   1.0000030] mainbus_attach() at netbsd:mainbus_attach+0x13f x86_cpubus_attach sys/arch/x86/x86/mainbus.c:175 [inline]
[   1.0000030] mainbus_attach() at netbsd:mainbus_attach+0x13f sys/arch/x86/x86/mainbus.c:229
[   1.0000030] config_vattach() at netbsd:config_vattach+0x4b8 sys/kern/subr_autoconf.c:1763
[   1.0000030] config_attach() at netbsd:config_attach+0x58 sys/kern/subr_autoconf.c:1786
[   1.0000030] config_rootfound() at netbsd:config_rootfound+0x4a sys/kern/subr_autoconf.c:1290
[   1.0000030] cpu_configure() at netbsd:cpu_configure+0x58 sys/arch/amd64/amd64/autoconf.c:112
[   1.0000030] main() at netbsd:main+0x452 sys/kern/init_main.c:556
[   1.0000030] cpu0: End traceback...
[   1.0000030] fatal breakpoint trap in supervisor mode
[   1.0000030] trap type 1 code 0 rip 0xffffffff80221a95 cs 0x8 rflags 0x202 cr2 0 ilevel 0x8 rsp 0xffffffff86864710
[   1.0000030] curlwp 0xffffffff85f60f00 pid 0.0 lowest kstack 0xffffffff8685f2c0
Stopped in pid 0.0 (system) at  netbsd:breakpoint+0x5:  leave
breakpoint() at netbsd:breakpoint+0x5
db_panic() at netbsd:db_panic+0xec sys/ddb/db_panic.c:67
vpanic() at netbsd:vpanic+0x2d0 sys/kern/subr_prf.c:290
isAlreadyReported() at netbsd:isAlreadyReported
HandleTypeMismatch() at netbsd:HandleTypeMismatch+0xfc sys/../common/lib/libc/misc/ubsan.c:432
AcpiNsRootInitialize() at netbsd:AcpiNsRootInitialize+0x6fb sys/external/bsd/acpica/dist/namespace/nsaccess.c:146
AcpiInitializeSubsystem() at netbsd:AcpiInitializeSubsystem+0x77 sys/external/bsd/acpica/dist/utilities/utxfinit.c:119
acpi_probe() at netbsd:acpi_probe+0x44 sys/dev/acpi/acpi.c:273
mainbus_attach() at netbsd:mainbus_attach+0x13f x86_cpubus_attach sys/arch/x86/x86/mainbus.c:175 [inline]
mainbus_attach() at netbsd:mainbus_attach+0x13f sys/arch/x86/x86/mainbus.c:229
config_vattach() at netbsd:config_vattach+0x4b8 sys/kern/subr_autoconf.c:1763
config_attach() at netbsd:config_attach+0x58 sys/kern/subr_autoconf.c:1786
config_rootfound() at netbsd:config_rootfound+0x4a sys/kern/subr_autoconf.c:1290
cpu_configure() at netbsd:cpu_configure+0x58 sys/arch/amd64/amd64/autoconf.c:112
main() at netbsd:main+0x452 sys/kern/init_main.c:556
ds          5f00
es          46d0
fs          4720
gs          10
rdi         0
rsi         1
rbp         ffffffff86864710
rbx         1
--db_more--

Crashes (120):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/05/30 19:21 netbsd 03768bd31a87 325a8dab .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/30 16:40 netbsd 55acbd29d231 325a8dab .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/30 14:20 netbsd b739f41bff0c 325a8dab .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/30 12:23 netbsd d5859abb6bf8 325a8dab .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/30 10:00 netbsd 13b4029bb4f4 325a8dab .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/30 07:44 netbsd f60826d1f59b 325a8dab .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/30 04:50 netbsd 7d2137adc7be 325a8dab .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/30 04:50 netbsd 7d2137adc7be 325a8dab .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/30 02:59 netbsd 05a3caa9e832 325a8dab .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/30 00:30 netbsd 4a38cff02593 325a8dab .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/29 22:18 netbsd 00dcb8a39599 325a8dab .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/29 20:00 netbsd 2a54106e6225 325a8dab .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/29 17:08 netbsd 52ad624946a4 325a8dab .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/29 16:01 netbsd 554a9b536adf 325a8dab .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/29 14:12 netbsd 554a9b536adf 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/29 14:12 netbsd 554a9b536adf 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/29 12:12 netbsd 47ce9a072eaf 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/29 09:52 netbsd a2bd19e270d6 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/29 05:32 netbsd 0a15b80021f4 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/28 16:56 netbsd 27d782052177 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/28 11:02 netbsd ef31195eacd8 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/28 08:48 netbsd 4e87c09096b7 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/28 07:02 netbsd 4e8dbedfeb93 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/28 04:03 netbsd 2781d7df9a7e 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/28 01:43 netbsd 9e08a540b2df 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/27 23:43 netbsd badda032f8b0 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/27 21:23 netbsd b1106d3d5932 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/27 19:48 netbsd 98ab0552a2a9 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/27 17:20 netbsd 9792369213c3 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/27 17:20 netbsd 9792369213c3 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/27 15:22 netbsd dcccabbb4e54 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/27 15:22 netbsd dcccabbb4e54 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/27 15:22 netbsd dcccabbb4e54 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/27 13:47 netbsd 60aa3e95c276 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/27 13:47 netbsd 60aa3e95c276 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/27 13:47 netbsd 60aa3e95c276 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/26 22:24 netbsd c3e85a7bd531 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/26 22:24 netbsd c3e85a7bd531 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/26 22:24 netbsd c3e85a7bd531 858ea628 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/26 17:42 netbsd c3e85a7bd531 750ce164 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/26 17:42 netbsd c3e85a7bd531 750ce164 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/26 17:42 netbsd c3e85a7bd531 750ce164 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/26 13:37 netbsd 19cf8561e6e0 750ce164 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/26 13:37 netbsd 19cf8561e6e0 750ce164 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/26 13:37 netbsd 19cf8561e6e0 750ce164 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/26 11:43 netbsd eacbd2a4053b 750ce164 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/26 11:43 netbsd eacbd2a4053b 750ce164 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/26 11:43 netbsd eacbd2a4053b 750ce164 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
2021/05/25 17:25 netbsd 1245af71c68b 93d3a9f6 .config console log report ci2-netbsd-kubsan netbsd boot error: UBSan: Undefined Behavior in AcpiNsRootInitialize
* Struck through repros no longer work on HEAD.