==================================================================
BUG: KASAN: slab-out-of-bounds in hex_dump_to_buffer+0x3b2/0xd60 lib/hexdump.c:193
Read of size 1 at addr ffff888079f71600 by task kworker/u4:8/7143
CPU: 1 PID: 7143 Comm: kworker/u4:8 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Workqueue: netns cleanup_net
Call Trace:
dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
print_address_description+0x60/0x2d0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:434 [inline]
kasan_report+0xdf/0x130 mm/kasan/report.c:451
hex_dump_to_buffer+0x3b2/0xd60 lib/hexdump.c:193
print_hex_dump+0x168/0x2b0 lib/hexdump.c:276
pn533_recv_frame+0x593/0x5f0 drivers/nfc/pn533/pn533.c:2206
__usb_hcd_giveback_urb+0x35d/0x520 drivers/usb/core/hcd.c:1674
dummy_timer+0xa44/0x3570 drivers/usb/gadget/udc/dummy_hcd.c:2016
call_timer_fn+0x17b/0x540 kernel/time/timer.c:1648
expire_timers kernel/time/timer.c:1699 [inline]
__run_timers+0x56c/0x810 kernel/time/timer.c:1970
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1983
handle_softirqs+0x336/0x830 kernel/softirq.c:576
__do_softirq kernel/softirq.c:610 [inline]
invoke_softirq kernel/softirq.c:450 [inline]
__irq_exit_rcu+0x13b/0x230 kernel/softirq.c:659
irq_exit_rcu+0x5/0x20 kernel/softirq.c:671
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline]
sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676
RIP: 0010:finish_lock_switch+0x12f/0x290 kernel/sched/core.c:4804
Code: 83 c7 18 be ff ff ff ff e8 9e 2b 75 08 85 c0 74 46 4d 85 ff 75 62 0f 1f 44 00 00 48 89 df e8 38 9f 7e 08 e8 33 f7 2a 00 fb 5b <41> 5c 41 5d 41 5e 41 5f 5d c3 48 89 df e8 2f 0e fe ff 43 80 3c 2c
RSP: 0018:ffffc900043df558 EFLAGS: 00000282
RAX: 4657bfa625fda600 RBX: ffff888025619dc0 RCX: 4657bfa625fda600
RDX: dffffc0000000000 RSI: ffffffff8a2b2b60 RDI: ffffffff8a7a5100
RBP: 1ffff110171e7613 R08: ffffffff910470cf R09: 1ffffffff2208e19
R10: dffffc0000000000 R11: fffffbfff2208e1a R12: 1ffff110171e75c1
R13: dffffc0000000000 R14: ffff8880b8f3ae08 R15: 0000000000000000
finish_task_switch+0x12f/0x650 kernel/sched/core.c:4921
context_switch kernel/sched/core.c:5052 [inline]
__schedule+0x11cb/0x4350 kernel/sched/core.c:6395
preempt_schedule_irq+0xbb/0x160 kernel/sched/core.c:6799
irqentry_exit+0x63/0x70 kernel/entry/common.c:435
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676
RIP: 0010:lock_acquire+0x209/0x400 kernel/locking/lockdep.c:5741
Code: f7 84 24 80 00 00 00 00 02 00 00 43 c6 44 3c 04 f8 0f 85 f0 00 00 00 41 f7 c6 00 02 00 00 74 01 fb 48 c7 44 24 60 0e 36 e0 45 <4b> c7 04 3c 00 00 00 00 43 c7 44 3c 08 00 00 00 00 65 48 8b 04 25
RSP: 0018:ffffc900043df920 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 0000000000000000 RCX: 4657bfa625fda600
RDX: 0000000000000000 RSI: ffffffff8a2b3e00 RDI: ffffffff8a7a5100
RBP: ffffc900043dfa40 R08: dffffc0000000000 R09: 1ffffffff2208e18
R10: dffffc0000000000 R11: fffffbfff2208e19 R12: 1ffff9200087bf30
R13: ffffffff8d11efa0 R14: 0000000000000246 R15: dffffc0000000000
rcu_lock_acquire+0x2a/0x30 include/linux/rcupdate.h:313
rcu_read_lock include/linux/rcupdate.h:740 [inline]
inet_twsk_purge+0x10d/0x820 net/ipv4/inet_timewait_sock.c:268
ops_exit_list net/core/net_namespace.c:177 [inline]
cleanup_net+0x78e/0xba0 net/core/net_namespace.c:635
process_one_work+0x867/0xff0 kernel/workqueue.c:2310
worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457
kthread+0x42e/0x520 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
Allocated by task 7143:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:46 [inline]
set_alloc_info mm/kasan/common.c:434 [inline]
____kasan_kmalloc mm/kasan/common.c:513 [inline]
__kasan_kmalloc+0xaf/0xe0 mm/kasan/common.c:522
kmalloc_reserve net/core/skbuff.c:356 [inline]
__alloc_skb+0x22c/0x750 net/core/skbuff.c:427
alloc_skb include/linux/skbuff.h:1162 [inline]
pn533_recv_response+0xbc/0x230 drivers/nfc/pn533/usb.c:65
__usb_hcd_giveback_urb+0x35d/0x520 drivers/usb/core/hcd.c:1674
dummy_timer+0xa44/0x3570 drivers/usb/gadget/udc/dummy_hcd.c:2016
call_timer_fn+0x17b/0x540 kernel/time/timer.c:1648
expire_timers kernel/time/timer.c:1699 [inline]
__run_timers+0x56c/0x810 kernel/time/timer.c:1970
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1983
handle_softirqs+0x336/0x830 kernel/softirq.c:576
__do_softirq kernel/softirq.c:610 [inline]
invoke_softirq kernel/softirq.c:450 [inline]
__irq_exit_rcu+0x13b/0x230 kernel/softirq.c:659
irq_exit_rcu+0x5/0x20 kernel/softirq.c:671
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline]
sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676
Last potentially related work creation:
kasan_save_stack+0x35/0x60 mm/kasan/common.c:38
kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348
insert_work+0x54/0x3d0 kernel/workqueue.c:1366
__queue_work+0x90b/0xc80 kernel/workqueue.c:1532
call_timer_fn+0x17b/0x540 kernel/time/timer.c:1648
expire_timers kernel/time/timer.c:1694 [inline]
__run_timers+0x598/0x810 kernel/time/timer.c:1970
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1983
handle_softirqs+0x336/0x830 kernel/softirq.c:576
__do_softirq kernel/softirq.c:610 [inline]
invoke_softirq kernel/softirq.c:450 [inline]
__irq_exit_rcu+0x13b/0x230 kernel/softirq.c:659
irq_exit_rcu+0x5/0x20 kernel/softirq.c:671
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline]
sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676
Second to last potentially related work creation:
kasan_save_stack+0x35/0x60 mm/kasan/common.c:38
kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348
__call_rcu kernel/rcu/tree.c:3011 [inline]
call_rcu+0x189/0x900 kernel/rcu/tree.c:3091
fib6_info_release include/net/ip6_fib.h:339 [inline]
fib6_del_route net/ipv6/ip6_fib.c:2001 [inline]
fib6_del+0x1142/0x1550 net/ipv6/ip6_fib.c:2034
fib6_clean_node+0x28c/0x540 net/ipv6/ip6_fib.c:2196
fib6_walk_continue+0x662/0x8b0 net/ipv6/ip6_fib.c:2118
fib6_walk+0x149/0x260 net/ipv6/ip6_fib.c:2166
fib6_clean_tree net/ipv6/ip6_fib.c:2246 [inline]
__fib6_clean_all+0x252/0x3b0 net/ipv6/ip6_fib.c:2262
rt6_sync_down_dev net/ipv6/route.c:4918 [inline]
rt6_disable_ip+0x127/0x6b0 net/ipv6/route.c:4923
addrconf_ifdown+0x149/0x19f0 net/ipv6/addrconf.c:3793
addrconf_notify+0x445/0xf20 net/ipv6/addrconf.c:-1
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391
call_netdevice_notifiers_extack net/core/dev.c:2074 [inline]
call_netdevice_notifiers net/core/dev.c:2088 [inline]
dev_close_many+0x29c/0x400 net/core/dev.c:1663
unregister_netdevice_many+0x4b8/0x1a40 net/core/dev.c:11137
default_device_exit_batch+0x364/0x3c0 net/core/dev.c:11694
ops_exit_list net/core/net_namespace.c:177 [inline]
cleanup_net+0x78e/0xba0 net/core/net_namespace.c:635
process_one_work+0x867/0xff0 kernel/workqueue.c:2310
worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457
kthread+0x42e/0x520 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
The buggy address belongs to the object at ffff888079f71400
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 0 bytes to the right of
512-byte region [ffff888079f71400, ffff888079f71600)
The buggy address belongs to the page:
page:ffffea0001e7dc00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x79f70
head:ffffea0001e7dc00 order:2 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888017841c80
raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3561, ts 29191888458, free_ts 26235902613
prep_new_page mm/page_alloc.c:2426 [inline]
get_page_from_freelist+0x24f6/0x2670 mm/page_alloc.c:4192
__alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501
alloc_slab_page mm/slub.c:1780 [inline]
allocate_slab mm/slub.c:1917 [inline]
new_slab+0xc0/0x4b0 mm/slub.c:1980
___slab_alloc+0x807/0xdd0 mm/slub.c:3013
__slab_alloc mm/slub.c:3100 [inline]
slab_alloc_node mm/slub.c:3191 [inline]
__kmalloc_node_track_caller+0x13d/0x3a0 mm/slub.c:4963
kmalloc_reserve net/core/skbuff.c:356 [inline]
__alloc_skb+0x22c/0x750 net/core/skbuff.c:427
alloc_skb include/linux/skbuff.h:1162 [inline]
alloc_uevent_skb+0x7d/0x230 lib/kobject_uevent.c:290
uevent_net_broadcast_untagged lib/kobject_uevent.c:326 [inline]
kobject_uevent_net_broadcast+0x2e6/0x530 lib/kobject_uevent.c:409
kobject_uevent_env+0x550/0x890 lib/kobject_uevent.c:608
kobject_synth_uevent+0x457/0x940 lib/kobject_uevent.c:208
uevent_store+0x48/0x70 drivers/base/bus.c:583
kernfs_fop_write_iter+0x3a8/0x500 fs/kernfs/file.c:296
call_write_iter include/linux/fs.h:2179 [inline]
new_sync_write fs/read_write.c:507 [inline]
vfs_write+0x748/0xd70 fs/read_write.c:594
ksys_write+0x153/0x260 fs/read_write.c:647
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1340 [inline]
free_pcp_prepare mm/page_alloc.c:1391 [inline]
free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317
free_unref_page+0x8f/0x2a0 mm/page_alloc.c:3396
free_contig_range+0x96/0xf0 mm/page_alloc.c:9428
destroy_args+0xef/0xa00 mm/debug_vm_pgtable.c:1018
debug_vm_pgtable+0x321/0x380 mm/debug_vm_pgtable.c:1336
do_one_initcall+0x272/0x730 init/main.c:1276
do_initcall_level+0x13d/0x1f0 init/main.c:1349
do_initcalls+0x4b/0x90 init/main.c:1365
kernel_init_freeable+0x3d5/0x560 init/main.c:1589
kernel_init+0x19/0x1b0 init/main.c:1480
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
Memory state around the buggy address:
ffff888079f71500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888079f71580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff888079f71600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff888079f71680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888079f71700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: 83 c7 18 add $0x18,%edi
3: be ff ff ff ff mov $0xffffffff,%esi
8: e8 9e 2b 75 08 call 0x8752bab
d: 85 c0 test %eax,%eax
f: 74 46 je 0x57
11: 4d 85 ff test %r15,%r15
14: 75 62 jne 0x78
16: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
1b: 48 89 df mov %rbx,%rdi
1e: e8 38 9f 7e 08 call 0x87e9f5b
23: e8 33 f7 2a 00 call 0x2af75b
28: fb sti
29: 5b pop %rbx
* 2a: 41 5c pop %r12 <-- trapping instruction
2c: 41 5d pop %r13
2e: 41 5e pop %r14
30: 41 5f pop %r15
32: 5d pop %rbp
33: c3 ret
34: 48 89 df mov %rbx,%rdi
37: e8 2f 0e fe ff call 0xfffe0e6b
3c: 43 rex.XB
3d: 80 .byte 0x80
3e: 3c 2c cmp $0x2c,%al