Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* KMSAN: uninit-value in skb_trim
@ 2020-08-24 13:58 syzbot
2021-03-21 9:14 ` [syzbot] " syzbot
0 siblings, 1 reply; 2+ messages in thread
From: syzbot @ 2020-08-24 13:58 UTC (permalink / raw)
To: ath9k-devel, davem, glider, kuba, kvalo, linux-kernel,
linux-wireless, netdev, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: ce8056d1 wip: changed copy_from_user where instrumented
git tree: https://github.com/google/kmsan.git master
console output: https://syzkaller.appspot.com/x/log.txt?x=16e3c4b6900000
kernel config: https://syzkaller.appspot.com/x/.config?x=3afe005fb99591f
dashboard link: https://syzkaller.appspot.com/bug?extid=e4534e8c1c382508312c
compiler: clang version 10.0.0 (https://github.com/llvm/llvm-project/ c2443155a0fb245c8f17f2c1c72b6ea391e86e81)
Unfortunately, I don't have any reproducer for this issue yet.
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+e4534e8c1c382508312c@syzkaller.appspotmail.com
=====================================================
BUG: KMSAN: uninit-value in skb_trim+0x1f2/0x280 net/core/skbuff.c:1916
CPU: 1 PID: 8770 Comm: syz-executor.1 Not tainted 5.8.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
<IRQ>
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x21c/0x280 lib/dump_stack.c:118
kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:121
__msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215
skb_trim+0x1f2/0x280 net/core/skbuff.c:1916
ath9k_htc_rx_msg+0x5f6/0x1f50 drivers/net/wireless/ath/ath9k/htc_hst.c:453
ath9k_hif_usb_rx_stream drivers/net/wireless/ath/ath9k/hif_usb.c:638 [inline]
ath9k_hif_usb_rx_cb+0x1841/0x1d10 drivers/net/wireless/ath/ath9k/hif_usb.c:671
__usb_hcd_giveback_urb+0x687/0x870 drivers/usb/core/hcd.c:1650
usb_hcd_giveback_urb+0x1cb/0x730 drivers/usb/core/hcd.c:1716
dummy_timer+0xd98/0x71c0 drivers/usb/gadget/udc/dummy_hcd.c:1967
call_timer_fn+0x226/0x550 kernel/time/timer.c:1404
expire_timers+0x4fc/0x780 kernel/time/timer.c:1449
__run_timers+0xaf4/0xd30 kernel/time/timer.c:1773
run_timer_softirq+0x2d/0x50 kernel/time/timer.c:1786
__do_softirq+0x2ea/0x7f5 kernel/softirq.c:293
asm_call_on_stack+0xf/0x20 arch/x86/entry/entry_64.S:711
</IRQ>
__run_on_irqstack arch/x86/include/asm/irq_stack.h:23 [inline]
run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:50 [inline]
do_softirq_own_stack+0x7c/0xa0 arch/x86/kernel/irq_64.c:77
invoke_softirq kernel/softirq.c:390 [inline]
__irq_exit_rcu+0x226/0x270 kernel/softirq.c:420
irq_exit_rcu+0xe/0x10 kernel/softirq.c:432
sysvec_apic_timer_interrupt+0x107/0x130 arch/x86/kernel/apic/apic.c:1091
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:593
RIP: 0010:kmsan_slab_free+0x8c/0xb0 mm/kmsan/kmsan_hooks.c:109
Code: 00 00 b9 03 00 00 00 e8 12 ea ff ff be ff ff ff ff 65 0f c1 35 75 57 cc 7d ff ce 75 1a e8 6c ff 14 ff 4c 89 7d e0 ff 75 e0 9d <48> 83 c4 10 5b 41 5e 41 5f 5d c3 0f 0b 48 c7 c7 b0 63 e1 91 31 c0
RSP: 0018:ffff888036ea36e8 EFLAGS: 00000246
RAX: c38ce7a59d21d100 RBX: ffff88812f403c00 RCX: 0000000000000003
RDX: 0000000000000002 RSI: 0000000000000000 RDI: ffff8881c7f65bb0
RBP: ffff888036ea3710 R08: ffffea000000000f R09: ffff88812fffa000
R10: 0000000000000010 R11: ffffffff912007f5 R12: 0000000000000000
R13: 0000000000000000 R14: ffff8881c7f65bb0 R15: 0000000000000246
slab_free_freelist_hook mm/slub.c:1507 [inline]
slab_free mm/slub.c:3088 [inline]
kfree+0x4f3/0x3000 mm/slub.c:4069
kvfree+0x91/0xa0 mm/util.c:603
__vunmap+0xfec/0x1080 mm/vmalloc.c:2320
__vfree mm/vmalloc.c:2364 [inline]
vfree+0xcc/0x1c0 mm/vmalloc.c:2394
copy_entries_to_user net/ipv4/netfilter/ip_tables.c:867 [inline]
get_entries net/ipv4/netfilter/ip_tables.c:1024 [inline]
do_ipt_get_ctl+0x115c/0x11e0 net/ipv4/netfilter/ip_tables.c:1700
nf_sockopt net/netfilter/nf_sockopt.c:104 [inline]
nf_getsockopt+0x588/0x5e0 net/netfilter/nf_sockopt.c:122
ip_getsockopt+0x34e/0x520 net/ipv4/ip_sockglue.c:1749
tcp_getsockopt+0x1de/0x210 net/ipv4/tcp.c:3893
sock_common_getsockopt+0x13a/0x170 net/core/sock.c:3221
__sys_getsockopt+0x6c7/0x820 net/socket.c:2172
__do_sys_getsockopt net/socket.c:2187 [inline]
__se_sys_getsockopt+0xe1/0x100 net/socket.c:2184
__x64_sys_getsockopt+0x62/0x80 net/socket.c:2184
do_syscall_64+0xad/0x160 arch/x86/entry/common.c:386
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x46008a
Code: Bad RIP value.
RSP: 002b:000000000169f6b8 EFLAGS: 00000212 ORIG_RAX: 0000000000000037
RAX: ffffffffffffffda RBX: 000000000169f6e0 RCX: 000000000046008a
RDX: 0000000000000041 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000000749e60 R08: 000000000169f6dc R09: 0000000000004000
R10: 000000000169f740 R11: 0000000000000212 R12: 000000000169f740
R13: 0000000000000003 R14: 0000000000748a20 R15: 0000000000000000
Uninit was created at:
kmsan_save_stack_with_flags+0x3c/0x90 mm/kmsan/kmsan.c:144
kmsan_internal_alloc_meta_for_pages mm/kmsan/kmsan_shadow.c:269 [inline]
kmsan_alloc_page+0xc5/0x1a0 mm/kmsan/kmsan_shadow.c:293
__alloc_pages_nodemask+0xdf0/0x1030 mm/page_alloc.c:4889
__alloc_pages include/linux/gfp.h:509 [inline]
__alloc_pages_node include/linux/gfp.h:522 [inline]
alloc_pages_node include/linux/gfp.h:536 [inline]
__page_frag_cache_refill mm/page_alloc.c:4964 [inline]
page_frag_alloc+0x35b/0x880 mm/page_alloc.c:4994
__netdev_alloc_skb+0x2a8/0xc90 net/core/skbuff.c:451
__dev_alloc_skb include/linux/skbuff.h:2813 [inline]
ath9k_hif_usb_rx_stream drivers/net/wireless/ath/ath9k/hif_usb.c:620 [inline]
ath9k_hif_usb_rx_cb+0xe5a/0x1d10 drivers/net/wireless/ath/ath9k/hif_usb.c:671
__usb_hcd_giveback_urb+0x687/0x870 drivers/usb/core/hcd.c:1650
usb_hcd_giveback_urb+0x1cb/0x730 drivers/usb/core/hcd.c:1716
dummy_timer+0xd98/0x71c0 drivers/usb/gadget/udc/dummy_hcd.c:1967
call_timer_fn+0x226/0x550 kernel/time/timer.c:1404
expire_timers+0x4fc/0x780 kernel/time/timer.c:1449
__run_timers+0xaf4/0xd30 kernel/time/timer.c:1773
run_timer_softirq+0x2d/0x50 kernel/time/timer.c:1786
__do_softirq+0x2ea/0x7f5 kernel/softirq.c:293
=====================================================
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [syzbot] KMSAN: uninit-value in skb_trim
2020-08-24 13:58 KMSAN: uninit-value in skb_trim syzbot
@ 2021-03-21 9:14 ` syzbot
0 siblings, 0 replies; 2+ messages in thread
From: syzbot @ 2021-03-21 9:14 UTC (permalink / raw)
To: ath9k-devel, davem, glider, kuba, kvalo, linux-kernel,
linux-wireless, maria, netdev, syzkaller-bugs
syzbot has found a reproducer for the following issue on:
HEAD commit: 29ad81a1 arch/x86: add missing include to sparsemem.h
git tree: https://github.com/google/kmsan.git master
console output: https://syzkaller.appspot.com/x/log.txt?x=16b7e7b2d00000
kernel config: https://syzkaller.appspot.com/x/.config?x=9c7da2160236454
dashboard link: https://syzkaller.appspot.com/bug?extid=e4534e8c1c382508312c
compiler: Debian clang version 11.0.1-2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12897ef6d00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=143ee4aad00000
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+e4534e8c1c382508312c@syzkaller.appspotmail.com
=====================================================
BUG: KMSAN: uninit-value in skb_trim+0x1fa/0x280 net/core/skbuff.c:1927
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.11.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
<IRQ>
__dump_stack lib/dump_stack.c:79 [inline]
dump_stack+0x21c/0x280 lib/dump_stack.c:120
kmsan_report+0xfb/0x1e0 mm/kmsan/kmsan_report.c:118
__msan_warning+0x5f/0xa0 mm/kmsan/kmsan_instr.c:197
skb_trim+0x1fa/0x280 net/core/skbuff.c:1927
ath9k_htc_rx_msg+0x631/0x1f30 drivers/net/wireless/ath/ath9k/htc_hst.c:455
ath9k_hif_usb_rx_stream drivers/net/wireless/ath/ath9k/hif_usb.c:647 [inline]
ath9k_hif_usb_rx_cb+0x184e/0x1d20 drivers/net/wireless/ath/ath9k/hif_usb.c:680
__usb_hcd_giveback_urb+0x6ff/0x930 drivers/usb/core/hcd.c:1656
usb_hcd_giveback_urb+0x1cb/0x730 drivers/usb/core/hcd.c:1726
dummy_timer+0xda7/0x74f0 drivers/usb/gadget/udc/dummy_hcd.c:1971
call_timer_fn+0x7d/0x450 kernel/time/timer.c:1417
expire_timers+0x328/0x6c0 kernel/time/timer.c:1462
__run_timers+0x624/0x9e0 kernel/time/timer.c:1731
run_timer_softirq+0x2d/0x50 kernel/time/timer.c:1744
__do_softirq+0x1b9/0x715 kernel/softirq.c:343
asm_call_irq_on_stack+0xf/0x20
</IRQ>
__run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline]
run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline]
do_softirq_own_stack+0x6e/0x90 arch/x86/kernel/irq_64.c:77
invoke_softirq kernel/softirq.c:226 [inline]
__irq_exit_rcu+0x22f/0x280 kernel/softirq.c:420
irq_exit_rcu+0xe/0x10 kernel/softirq.c:432
sysvec_apic_timer_interrupt+0x106/0x130 arch/x86/kernel/apic/apic.c:1100
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:647
RIP: 0010:native_irq_disable arch/x86/include/asm/irqflags.h:49 [inline]
RIP: 0010:arch_local_irq_disable arch/x86/include/asm/irqflags.h:89 [inline]
RIP: 0010:acpi_safe_halt drivers/acpi/processor_idle.c:111 [inline]
RIP: 0010:acpi_idle_do_entry drivers/acpi/processor_idle.c:516 [inline]
RIP: 0010:acpi_idle_enter+0x61d/0x760 drivers/acpi/processor_idle.c:647
Code: f7 d3 44 21 e3 48 85 db 0f 84 ec 00 00 00 4d 85 e4 0f 85 f4 00 00 00 e9 0c 00 00 00 e8 1c b5 3a fb 0f 00 2d 5f e7 5d 09 fb f4 <fa> e9 e0 00 00 00 84 c0 8b 7d b8 0f 45 7d 98 e8 8f 3b bc fb e9 e5
RSP: 0018:ffffffff91403b70 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000023eaec040
RDX: ffffffff91431040 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffffff91403c08 R08: ffffffff86809bde R09: ffff88813fffa000
R10: 0000000000000002 R11: ffffffff91431040 R12: 0000000000000000
R13: ffff888102fa0064 R14: 0000000000000000 R15: ffffffff91431ab8
cpuidle_enter_state+0x99e/0x1750 drivers/cpuidle/cpuidle.c:237
cpuidle_enter+0xe3/0x170 drivers/cpuidle/cpuidle.c:351
call_cpuidle kernel/sched/idle.c:158 [inline]
cpuidle_idle_call kernel/sched/idle.c:239 [inline]
do_idle+0x5df/0x790 kernel/sched/idle.c:299
cpu_startup_entry+0x45/0x50 kernel/sched/idle.c:396
rest_init+0x1c8/0x1f0 init/main.c:721
arch_call_rest_init+0x13/0x15
start_kernel+0xa17/0xbd8 init/main.c:1064
x86_64_start_reservations+0x2a/0x2c arch/x86/kernel/head64.c:525
x86_64_start_kernel+0x86/0x89 arch/x86/kernel/head64.c:506
secondary_startup_64_no_verify+0xb0/0xbb
Uninit was created at:
kmsan_save_stack_with_flags mm/kmsan/kmsan.c:121 [inline]
kmsan_internal_poison_shadow+0x5c/0xf0 mm/kmsan/kmsan.c:104
kmsan_slab_alloc+0x8d/0xe0 mm/kmsan/kmsan_hooks.c:76
slab_alloc_node mm/slub.c:2907 [inline]
__kmalloc_node_track_caller+0xa37/0x1430 mm/slub.c:4527
__kmalloc_reserve net/core/skbuff.c:142 [inline]
__alloc_skb+0x2f8/0xb30 net/core/skbuff.c:210
__netdev_alloc_skb+0x450/0x7f0 net/core/skbuff.c:446
__dev_alloc_skb include/linux/skbuff.h:2839 [inline]
ath9k_hif_usb_rx_stream drivers/net/wireless/ath/ath9k/hif_usb.c:629 [inline]
ath9k_hif_usb_rx_cb+0xe58/0x1d20 drivers/net/wireless/ath/ath9k/hif_usb.c:680
__usb_hcd_giveback_urb+0x6ff/0x930 drivers/usb/core/hcd.c:1656
usb_hcd_giveback_urb+0x1cb/0x730 drivers/usb/core/hcd.c:1726
dummy_timer+0xda7/0x74f0 drivers/usb/gadget/udc/dummy_hcd.c:1971
call_timer_fn+0x7d/0x450 kernel/time/timer.c:1417
expire_timers+0x328/0x6c0 kernel/time/timer.c:1462
__run_timers+0x624/0x9e0 kernel/time/timer.c:1731
run_timer_softirq+0x2d/0x50 kernel/time/timer.c:1744
__do_softirq+0x1b9/0x715 kernel/softirq.c:343
=====================================================
=====================================================
BUG: KMSAN: uninit-value in skb_trim+0x1fa/0x280 net/core/skbuff.c:1927
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G B 5.11.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
<IRQ>
__dump_stack lib/dump_stack.c:79 [inline]
dump_stack+0x21c/0x280 lib/dump_stack.c:120
kmsan_report+0xfb/0x1e0 mm/kmsan/kmsan_report.c:118
__msan_warning+0x5f/0xa0 mm/kmsan/kmsan_instr.c:197
skb_trim+0x1fa/0x280 net/core/skbuff.c:1927
ath9k_htc_rx_msg+0x631/0x1f30 drivers/net/wireless/ath/ath9k/htc_hst.c:455
ath9k_hif_usb_rx_stream drivers/net/wireless/ath/ath9k/hif_usb.c:647 [inline]
ath9k_hif_usb_rx_cb+0x184e/0x1d20 drivers/net/wireless/ath/ath9k/hif_usb.c:680
__usb_hcd_giveback_urb+0x6ff/0x930 drivers/usb/core/hcd.c:1656
usb_hcd_giveback_urb+0x1cb/0x730 drivers/usb/core/hcd.c:1726
dummy_timer+0xda7/0x74f0 drivers/usb/gadget/udc/dummy_hcd.c:1971
call_timer_fn+0x7d/0x450 kernel/time/timer.c:1417
expire_timers+0x328/0x6c0 kernel/time/timer.c:1462
__run_timers+0x624/0x9e0 kernel/time/timer.c:1731
run_timer_softirq+0x2d/0x50 kernel/time/timer.c:1744
__do_softirq+0x1b9/0x715 kernel/softirq.c:343
asm_call_irq_on_stack+0xf/0x20
</IRQ>
__run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline]
run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline]
do_softirq_own_stack+0x6e/0x90 arch/x86/kernel/irq_64.c:77
invoke_softirq kernel/softirq.c:226 [inline]
__irq_exit_rcu+0x22f/0x280 kernel/softirq.c:420
irq_exit_rcu+0xe/0x10 kernel/softirq.c:432
sysvec_apic_timer_interrupt+0x106/0x130 arch/x86/kernel/apic/apic.c:1100
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:647
RIP: 0010:native_irq_disable arch/x86/include/asm/irqflags.h:49 [inline]
RIP: 0010:arch_local_irq_disable arch/x86/include/asm/irqflags.h:89 [inline]
RIP: 0010:acpi_safe_halt drivers/acpi/processor_idle.c:111 [inline]
RIP: 0010:acpi_idle_do_entry drivers/acpi/processor_idle.c:516 [inline]
RIP: 0010:acpi_idle_enter+0x61d/0x760 drivers/acpi/processor_idle.c:647
Code: f7 d3 44 21 e3 48 85 db 0f 84 ec 00 00 00 4d 85 e4 0f 85 f4 00 00 00 e9 0c 00 00 00 e8 1c b5 3a fb 0f 00 2d 5f e7 5d 09 fb f4 <fa> e9 e0 00 00 00 84 c0 8b 7d b8 0f 45 7d 98 e8 8f 3b bc fb e9 e5
RSP: 0018:ffffffff91403b70 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000023eaec040
RDX: ffffffff91431040 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffffff91403c08 R08: ffffffff86809bde R09: ffff88813fffa000
R10: 0000000000000002 R11: ffffffff91431040 R12: 0000000000000000
R13: ffff888102fa0064 R14: 0000000000000000 R15: ffffffff91431ab8
cpuidle_enter_state+0x99e/0x1750 drivers/cpuidle/cpuidle.c:237
cpuidle_enter+0xe3/0x170 drivers/cpuidle/cpuidle.c:351
call_cpuidle kernel/sched/idle.c:158 [inline]
cpuidle_idle_call kernel/sched/idle.c:239 [inline]
do_idle+0x5df/0x790 kernel/sched/idle.c:299
cpu_startup_entry+0x45/0x50 kernel/sched/idle.c:396
rest_init+0x1c8/0x1f0 init/main.c:721
arch_call_rest_init+0x13/0x15
start_kernel+0xa17/0xbd8 init/main.c:1064
x86_64_start_reservations+0x2a/0x2c arch/x86/kernel/head64.c:525
x86_64_start_kernel+0x86/0x89 arch/x86/kernel/head64.c:506
secondary_startup_64_no_verify+0xb0/0xbb
Uninit was created at:
kmsan_save_stack_with_flags mm/kmsan/kmsan.c:121 [inline]
kmsan_internal_poison_shadow+0x5c/0xf0 mm/kmsan/kmsan.c:104
kmsan_slab_alloc+0x8d/0xe0 mm/kmsan/kmsan_hooks.c:76
slab_alloc_node mm/slub.c:2907 [inline]
__kmalloc_node_track_caller+0xa37/0x1430 mm/slub.c:4527
__kmalloc_reserve net/core/skbuff.c:142 [inline]
__alloc_skb+0x2f8/0xb30 net/core/skbuff.c:210
__netdev_alloc_skb+0x450/0x7f0 net/core/skbuff.c:446
__dev_alloc_skb include/linux/skbuff.h:2839 [inline]
ath9k_hif_usb_rx_stream drivers/net/wireless/ath/ath9k/hif_usb.c:629 [inline]
ath9k_hif_usb_rx_cb+0xe58/0x1d20 drivers/net/wireless/ath/ath9k/hif_usb.c:680
__usb_hcd_giveback_urb+0x6ff/0x930 drivers/usb/core/hcd.c:1656
usb_hcd_giveback_urb+0x1cb/0x730 drivers/usb/core/hcd.c:1726
dummy_timer+0xda7/0x74f0 drivers/usb/gadget/udc/dummy_hcd.c:1971
call_timer_fn+0x7d/0x450 kernel/time/timer.c:1417
expire_timers+0x328/0x6c0 kernel/time/timer.c:1462
__run_timers+0x624/0x9e0 kernel/time/timer.c:1731
run_timer_softirq+0x2d/0x50 kernel/time/timer.c:1744
__do_softirq+0x1b9/0x715 kernel/softirq.c:343
=====================================================
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-21 9:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-24 13:58 KMSAN: uninit-value in skb_trim syzbot
2021-03-21 9:14 ` [syzbot] " syzbot
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 NNTP newsgroup(s).