Hello,
syzbot found the following issue on:
HEAD commit: f5098b6bae76 Linux 7.2-rc5
git tree: upstream
console output:
https://syzkaller.appspot.com/x/log.txt?x=127fc49e580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=b7079b368dcec295
dashboard link:
https://syzkaller.appspot.com/bug?extid=eb3d3403a7a09c76b0d1
compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
CC: [
gre...@linuxfoundation.org linux-...@vger.kernel.org linu...@vger.kernel.org]
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/b18067cdf26c/disk-f5098b6b.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/2b364c33a0f2/vmlinux-f5098b6b.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/2dfce6f90a4d/bzImage-f5098b6b.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+eb3d34...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: slab-out-of-bounds in free_netdev+0x7d9/0x8c0 net/core/dev.c:12206
Read of size 8 at addr ffff88807c02cd48 by task syz.0.3719/21784
CPU: 1 UID: 0 PID: 21784 Comm: syz.0.3719 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0x13d/0x4b0 mm/kasan/report.c:482
kasan_report+0xdf/0x1c0 mm/kasan/report.c:595
free_netdev+0x7d9/0x8c0 net/core/dev.c:12206
gphonet_register_netdev drivers/usb/gadget/function/f_phonet.c:729 [inline]
pn_bind+0x3a7/0x5b0 drivers/usb/gadget/function/f_phonet.c:511
usb_add_function+0x219/0x890 drivers/usb/gadget/composite.c:333
configfs_composite_bind+0xd83/0x1960 drivers/usb/gadget/configfs.c:1802
gadget_bind_driver+0x28c/0xbf0 drivers/usb/gadget/udc/core.c:1662
call_driver_probe drivers/base/dd.c:628 [inline]
really_probe+0x241/0xa60 drivers/base/dd.c:706
__driver_probe_device+0x20e/0x450 drivers/base/dd.c:868
driver_probe_device+0x4a/0x140 drivers/base/dd.c:898
__driver_attach+0x21f/0x5b0 drivers/base/dd.c:1292
bus_for_each_dev+0x13e/0x1d0 drivers/base/bus.c:383
bus_add_driver+0x305/0x5b0 drivers/base/bus.c:763
driver_register+0x1e2/0x360 drivers/base/driver.c:174
usb_gadget_register_driver_owner+0x132/0x210 drivers/usb/gadget/udc/core.c:1752
gadget_dev_desc_UDC_store+0x1b0/0x2e0 drivers/usb/gadget/configfs.c:300
flush_write_buffer fs/configfs/file.c:207 [inline]
configfs_write_iter+0x302/0x4e0 fs/configfs/file.c:229
new_sync_write fs/read_write.c:595 [inline]
vfs_write+0x6ac/0x1050 fs/read_write.c:687
ksys_write+0x12a/0x250 fs/read_write.c:739
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f39ea99de99
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f39eb86e028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f39eac26090 RCX: 00007f39ea99de99
RDX: 000000000000000c RSI: 00002000000004c0 RDI: 0000000000000004
RBP: 00007f39eaa33eaf R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f39eac26128 R14: 00007f39eac26090 R15: 00007ffd7160c058
</TASK>
Allocated by task 18935:
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415
kasan_kmalloc include/linux/kasan.h:263 [inline]
__do_kmalloc_node mm/slub.c:5334 [inline]
__kvmalloc_node_noprof+0x34f/0x970 mm/slub.c:6905
veth_alloc_queues drivers/net/veth.c:1440 [inline]
veth_dev_init+0x37c/0x580 drivers/net/veth.c:1463
register_netdevice+0x685/0x25a0 net/core/dev.c:11365
veth_newlink+0x316/0xa00 drivers/net/veth.c:1863
rtnl_newlink_create net/core/rtnetlink.c:3913 [inline]
__rtnl_newlink net/core/rtnetlink.c:4044 [inline]
rtnl_newlink+0x1499/0x2380 net/core/rtnetlink.c:4159
rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:7076
netlink_rcv_skb+0x159/0x420 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x585/0x850 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x8b0/0xda0 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec net/socket.c:775 [inline]
__sock_sendmsg net/socket.c:790 [inline]
__sys_sendto+0x48b/0x4e0 net/socket.c:2252
__do_sys_sendto net/socket.c:2259 [inline]
__se_sys_sendto net/socket.c:2255 [inline]
__x64_sys_sendto+0xe0/0x1c0 net/socket.c:2255
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88807c02c000
which belongs to the cache kmalloc-cg-4k of size 4096
The buggy address is located 1096 bytes to the right of
allocated 2304-byte region [ffff88807c02c000, ffff88807c02c900)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7c028
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff888075be6fc1
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88813fe2b500 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800040004 00000000f5000000 ffff888075be6fc1
head: 00fff00000000040 ffff88813fe2b500 dead000000000100 dead000000000122
head: 0000000000000000 0000000800040004 00000000f5000000 ffff888075be6fc1
head: 00fff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5628, tgid 5628 (syz-executor), ts 104352423084, free_ts 104350333295
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1859
prep_new_page mm/page_alloc.c:1867 [inline]
get_page_from_freelist+0xf48/0x3530 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x299/0x2dc0 mm/page_alloc.c:5304
alloc_slab_page mm/slub.c:3266 [inline]
allocate_slab mm/slub.c:3380 [inline]
new_slab+0xa2/0x640 mm/slub.c:3426
refill_objects+0xe3/0x410 mm/slub.c:7310
refill_sheaf mm/slub.c:2804 [inline]
__pcs_replace_empty_main+0x376/0x680 mm/slub.c:4675
alloc_from_pcs mm/slub.c:4773 [inline]
slab_alloc_node mm/slub.c:4905 [inline]
__kmalloc_cache_noprof+0x479/0x6c0 mm/slub.c:5485
_kmalloc_noprof include/linux/slab.h:988 [inline]
_kzalloc_noprof include/linux/slab.h:1309 [inline]
snmp6_alloc_dev net/ipv6/addrconf.c:362 [inline]
ipv6_add_dev+0x670/0x1520 net/ipv6/addrconf.c:413
addrconf_notify+0x5db/0x1ba0 net/ipv6/addrconf.c:3685
notifier_call_chain+0x99/0x3f0 kernel/notifier.c:85
call_netdevice_notifiers_info+0xbe/0x110 net/core/dev.c:2250
call_netdevice_notifiers_extack net/core/dev.c:2288 [inline]
call_netdevice_notifiers net/core/dev.c:2302 [inline]
register_netdevice+0x1998/0x25a0 net/core/dev.c:11484
veth_newlink+0x316/0xa00 drivers/net/veth.c:1863
rtnl_newlink_create net/core/rtnetlink.c:3913 [inline]
__rtnl_newlink net/core/rtnetlink.c:4044 [inline]
rtnl_newlink+0x1499/0x2380 net/core/rtnetlink.c:4159
rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:7076
netlink_rcv_skb+0x159/0x420 net/netlink/af_netlink.c:2556
page last free pid 5628 tgid 5628 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1406 [inline]
__free_frozen_pages+0x79f/0x1090 mm/page_alloc.c:2950
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:350
kasan_slab_alloc include/linux/kasan.h:253 [inline]
slab_post_alloc_hook mm/slub.c:4584 [inline]
slab_alloc_node mm/slub.c:4917 [inline]
__kmalloc_cache_noprof+0x265/0x6c0 mm/slub.c:5485
_kmalloc_noprof include/linux/slab.h:988 [inline]
_kzalloc_noprof include/linux/slab.h:1309 [inline]
ref_tracker_alloc+0x190/0x590 lib/ref_tracker.c:270
__netdev_tracker_alloc include/linux/netdevice.h:4499 [inline]
netdev_hold include/linux/netdevice.h:4528 [inline]
netdev_hold include/linux/netdevice.h:4523 [inline]
netdev_queue_add_kobject net/core/net-sysfs.c:1973 [inline]
netdev_queue_update_kobjects+0x2db/0x6f0 net/core/net-sysfs.c:2035
register_queue_kobjects net/core/net-sysfs.c:2098 [inline]
netdev_register_kobject+0x2b3/0x3d0 net/core/net-sysfs.c:2341
register_netdevice+0x15b6/0x25a0 net/core/dev.c:11446
veth_newlink+0x316/0xa00 drivers/net/veth.c:1863
rtnl_newlink_create net/core/rtnetlink.c:3913 [inline]
__rtnl_newlink net/core/rtnetlink.c:4044 [inline]
rtnl_newlink+0x1499/0x2380 net/core/rtnetlink.c:4159
rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:7076
netlink_rcv_skb+0x159/0x420 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x585/0x850 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x8b0/0xda0 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec net/socket.c:775 [inline]
__sock_sendmsg net/socket.c:790 [inline]
__sys_sendto+0x48b/0x4e0 net/socket.c:2252
Memory state around the buggy address:
ffff88807c02cc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88807c02cc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88807c02cd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88807c02cd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88807c02ce00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
==================================================================
BUG: KASAN: slab-out-of-bounds in free_netdev+0x82e/0x8c0 net/core/dev.c:12206
Read of size 8 at addr ffff88807c02cd50 by task syz.0.3719/21784
CPU: 1 UID: 0 PID: 21784 Comm: syz.0.3719 Tainted: G B syzkaller #0 PREEMPT(full)
Tainted: [B]=BAD_PAGE
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0x13d/0x4b0 mm/kasan/report.c:482
kasan_report+0xdf/0x1c0 mm/kasan/report.c:595
free_netdev+0x82e/0x8c0 net/core/dev.c:12206
gphonet_register_netdev drivers/usb/gadget/function/f_phonet.c:729 [inline]
pn_bind+0x3a7/0x5b0 drivers/usb/gadget/function/f_phonet.c:511
usb_add_function+0x219/0x890 drivers/usb/gadget/composite.c:333
configfs_composite_bind+0xd83/0x1960 drivers/usb/gadget/configfs.c:1802
gadget_bind_driver+0x28c/0xbf0 drivers/usb/gadget/udc/core.c:1662
call_driver_probe drivers/base/dd.c:628 [inline]
really_probe+0x241/0xa60 drivers/base/dd.c:706
__driver_probe_device+0x20e/0x450 drivers/base/dd.c:868
driver_probe_device+0x4a/0x140 drivers/base/dd.c:898
__driver_attach+0x21f/0x5b0 drivers/base/dd.c:1292
bus_for_each_dev+0x13e/0x1d0 drivers/base/bus.c:383
bus_add_driver+0x305/0x5b0 drivers/base/bus.c:763
driver_register+0x1e2/0x360 drivers/base/driver.c:174
usb_gadget_register_driver_owner+0x132/0x210 drivers/usb/gadget/udc/core.c:1752
gadget_dev_desc_UDC_store+0x1b0/0x2e0 drivers/usb/gadget/configfs.c:300
flush_write_buffer fs/configfs/file.c:207 [inline]
configfs_write_iter+0x302/0x4e0 fs/configfs/file.c:229
new_sync_write fs/read_write.c:595 [inline]
vfs_write+0x6ac/0x1050 fs/read_write.c:687
ksys_write+0x12a/0x250 fs/read_write.c:739
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f39ea99de99
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f39eb86e028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f39eac26090 RCX: 00007f39ea99de99
RDX: 000000000000000c RSI: 00002000000004c0 RDI: 0000000000000004
RBP: 00007f39eaa33eaf R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f39eac26128 R14: 00007f39eac26090 R15: 00007ffd7160c058
</TASK>
Allocated by task 18935:
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415
kasan_kmalloc include/linux/kasan.h:263 [inline]
__do_kmalloc_node mm/slub.c:5334 [inline]
__kvmalloc_node_noprof+0x34f/0x970 mm/slub.c:6905
veth_alloc_queues drivers/net/veth.c:1440 [inline]
veth_dev_init+0x37c/0x580 drivers/net/veth.c:1463
register_netdevice+0x685/0x25a0 net/core/dev.c:11365
veth_newlink+0x316/0xa00 drivers/net/veth.c:1863
rtnl_newlink_create net/core/rtnetlink.c:3913 [inline]
__rtnl_newlink net/core/rtnetlink.c:4044 [inline]
rtnl_newlink+0x1499/0x2380 net/core/rtnetlink.c:4159
rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:7076
netlink_rcv_skb+0x159/0x420 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x585/0x850 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x8b0/0xda0 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec net/socket.c:775 [inline]
__sock_sendmsg net/socket.c:790 [inline]
__sys_sendto+0x48b/0x4e0 net/socket.c:2252
__do_sys_sendto net/socket.c:2259 [inline]
__se_sys_sendto net/socket.c:2255 [inline]
__x64_sys_sendto+0xe0/0x1c0 net/socket.c:2255
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88807c02c000
which belongs to the cache kmalloc-cg-4k of size 4096
The buggy address is located 1104 bytes to the right of
allocated 2304-byte region [ffff88807c02c000, ffff88807c02c900)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7c028
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff888075be6fc1
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88813fe2b500 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800040004 00000000f5000000 ffff888075be6fc1
head: 00fff00000000040 ffff88813fe2b500 dead000000000100 dead000000000122
head: 0000000000000000 0000000800040004 00000000f5000000 ffff888075be6fc1
head: 00fff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5628, tgid 5628 (syz-executor), ts 104352423084, free_ts 104350333295
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1859
prep_new_page mm/page_alloc.c:1867 [inline]
get_page_from_freelist+0xf48/0x3530 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x299/0x2dc0 mm/page_alloc.c:5304
alloc_slab_page mm/slub.c:3266 [inline]
allocate_slab mm/slub.c:3380 [inline]
new_slab+0xa2/0x640 mm/slub.c:3426
refill_objects+0xe3/0x410 mm/slub.c:7310
refill_sheaf mm/slub.c:2804 [inline]
__pcs_replace_empty_main+0x376/0x680 mm/slub.c:4675
alloc_from_pcs mm/slub.c:4773 [inline]
slab_alloc_node mm/slub.c:4905 [inline]
__kmalloc_cache_noprof+0x479/0x6c0 mm/slub.c:5485
_kmalloc_noprof include/linux/slab.h:988 [inline]
_kzalloc_noprof include/linux/slab.h:1309 [inline]
snmp6_alloc_dev net/ipv6/addrconf.c:362 [inline]
ipv6_add_dev+0x670/0x1520 net/ipv6/addrconf.c:413
addrconf_notify+0x5db/0x1ba0 net/ipv6/addrconf.c:3685
notifier_call_chain+0x99/0x3f0 kernel/notifier.c:85
call_netdevice_notifiers_info+0xbe/0x110 net/core/dev.c:2250
call_netdevice_notifiers_extack net/core/dev.c:2288 [inline]
call_netdevice_notifiers net/core/dev.c:2302 [inline]
register_netdevice+0x1998/0x25a0 net/core/dev.c:11484
veth_newlink+0x316/0xa00 drivers/net/veth.c:1863
rtnl_newlink_create net/core/rtnetlink.c:3913 [inline]
__rtnl_newlink net/core/rtnetlink.c:4044 [inline]
rtnl_newlink+0x1499/0x2380 net/core/rtnetlink.c:4159
rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:7076
netlink_rcv_skb+0x159/0x420 net/netlink/af_netlink.c:2556
page last free pid 5628 tgid 5628 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1406 [inline]
__free_frozen_pages+0x79f/0x1090 mm/page_alloc.c:2950
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:350
kasan_slab_alloc include/linux/kasan.h:253 [inline]
slab_post_alloc_hook mm/slub.c:4584 [inline]
slab_alloc_node mm/slub.c:4917 [inline]
__kmalloc_cache_noprof+0x265/0x6c0 mm/slub.c:5485
_kmalloc_noprof include/linux/slab.h:988 [inline]
_kzalloc_noprof include/linux/slab.h:1309 [inline]
ref_tracker_alloc+0x190/0x590 lib/ref_tracker.c:270
__netdev_tracker_alloc include/linux/netdevice.h:4499 [inline]
netdev_hold include/linux/netdevice.h:4528 [inline]
netdev_hold include/linux/netdevice.h:4523 [inline]
netdev_queue_add_kobject net/core/net-sysfs.c:1973 [inline]
netdev_queue_update_kobjects+0x2db/0x6f0 net/core/net-sysfs.c:2035
register_queue_kobjects net/core/net-sysfs.c:2098 [inline]
netdev_register_kobject+0x2b3/0x3d0 net/core/net-sysfs.c:2341
register_netdevice+0x15b6/0x25a0 net/core/dev.c:11446
veth_newlink+0x316/0xa00 drivers/net/veth.c:1863
rtnl_newlink_create net/core/rtnetlink.c:3913 [inline]
__rtnl_newlink net/core/rtnetlink.c:4044 [inline]
rtnl_newlink+0x1499/0x2380 net/core/rtnetlink.c:4159
rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:7076
netlink_rcv_skb+0x159/0x420 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x585/0x850 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x8b0/0xda0 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec net/socket.c:775 [inline]
__sock_sendmsg net/socket.c:790 [inline]
__sys_sendto+0x48b/0x4e0 net/socket.c:2252
Memory state around the buggy address:
ffff88807c02cc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88807c02cc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88807c02cd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88807c02cd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88807c02ce00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
==================================================================
BUG: KASAN: slab-out-of-bounds in free_netdev+0x7c2/0x8c0 net/core/dev.c:12208
Read of size 8 at addr ffff88807c02cd58 by task syz.0.3719/21784
CPU: 0 UID: 0 PID: 21784 Comm: syz.0.3719 Tainted: G B syzkaller #0 PREEMPT(full)
Tainted: [B]=BAD_PAGE
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0x13d/0x4b0 mm/kasan/report.c:482
kasan_report+0xdf/0x1c0 mm/kasan/report.c:595
free_netdev+0x7c2/0x8c0 net/core/dev.c:12208
gphonet_register_netdev drivers/usb/gadget/function/f_phonet.c:729 [inline]
pn_bind+0x3a7/0x5b0 drivers/usb/gadget/function/f_phonet.c:511
usb_add_function+0x219/0x890 drivers/usb/gadget/composite.c:333
configfs_composite_bind+0xd83/0x1960 drivers/usb/gadget/configfs.c:1802
gadget_bind_driver+0x28c/0xbf0 drivers/usb/gadget/udc/core.c:1662
call_driver_probe drivers/base/dd.c:628 [inline]
really_probe+0x241/0xa60 drivers/base/dd.c:706
__driver_probe_device+0x20e/0x450 drivers/base/dd.c:868
driver_probe_device+0x4a/0x140 drivers/base/dd.c:898
__driver_attach+0x21f/0x5b0 drivers/base/dd.c:1292
bus_for_each_dev+0x13e/0x1d0 drivers/base/bus.c:383
bus_add_driver+0x305/0x5b0 drivers/base/bus.c:763
driver_register+0x1e2/0x360 drivers/base/driver.c:174
usb_gadget_register_driver_owner+0x132/0x210 drivers/usb/gadget/udc/core.c:1752
gadget_dev_desc_UDC_store+0x1b0/0x2e0 drivers/usb/gadget/configfs.c:300
flush_write_buffer fs/configfs/file.c:207 [inline]
configfs_write_iter+0x302/0x4e0 fs/configfs/file.c:229
new_sync_write fs/read_write.c:595 [inline]
vfs_write+0x6ac/0x1050 fs/read_write.c:687
ksys_write+0x12a/0x250 fs/read_write.c:739
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f39ea99de99
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f39eb86e028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f39eac26090 RCX: 00007f39ea99de99
RDX: 000000000000000c RSI: 00002000000004c0 RDI: 0000000000000004
RBP: 00007f39eaa33eaf R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f39eac26128 R14: 00007f39eac26090 R15: 00007ffd7160c058
</TASK>
Allocated by task 18935:
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415
kasan_kmalloc include/linux/kasan.h:263 [inline]
__do_kmalloc_node mm/slub.c:5334 [inline]
__kvmalloc_node_noprof+0x34f/0x970 mm/slub.c:6905
veth_alloc_queues drivers/net/veth.c:1440 [inline]
veth_dev_init+0x37c/0x580 drivers/net/veth.c:1463
register_netdevice+0x685/0x25a0 net/core/dev.c:11365
veth_newlink+0x316/0xa00 drivers/net/veth.c:1863
rtnl_newlink_create net/core/rtnetlink.c:3913 [inline]
__rtnl_newlink net/core/rtnetlink.c:4044 [inline]
rtnl_newlink+0x1499/0x2380 net/core/rtnetlink.c:4159
rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:7076
netlink_rcv_skb+0x159/0x420 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x585/0x850 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x8b0/0xda0 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec net/socket.c:775 [inline]
__sock_sendmsg net/socket.c:790 [inline]
__sys_sendto+0x48b/0x4e0 net/socket.c:2252
__do_sys_sendto net/socket.c:2259 [inline]
__se_sys_sendto net/socket.c:2255 [inline]
__x64_sys_sendto+0xe0/0x1c0 net/socket.c:2255
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88807c02c000
which belongs to the cache kmalloc-cg-4k of size 4096
The buggy address is located 1112 bytes to the right of
allocated 2304-byte region [ffff88807c02c000, ffff88807c02c900)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7c028
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff888075be6fc1
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88813fe2b500 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800040004 00000000f5000000 ffff888075be6fc1
head: 00fff00000000040 ffff88813fe2b500 dead000000000100 dead000000000122
head: 0000000000000000 0000000800040004 00000000f5000000 ffff888075be6fc1
head: 00fff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5628, tgid 5628 (syz-executor), ts 104352423084, free_ts 104350333295
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1859
prep_new_page mm/page_alloc.c:1867 [inline]
get_page_from_freelist+0xf48/0x3530 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x299/0x2dc0 mm/page_alloc.c:5304
alloc_slab_page mm/slub.c:3266 [inline]
allocate_slab mm/slub.c:3380 [inline]
new_slab+0xa2/0x640 mm/slub.c:3426
refill_objects+0xe3/0x410 mm/slub.c:7310
refill_sheaf mm/slub.c:2804 [inline]
__pcs_replace_empty_main+0x376/0x680 mm/slub.c:4675
alloc_from_pcs mm/slub.c:4773 [inline]
slab_alloc_node mm/slub.c:4905 [inline]
__kmalloc_cache_noprof+0x479/0x6c0 mm/slub.c:5485
_kmalloc_noprof include/linux/slab.h:988 [inline]
_kzalloc_noprof include/linux/slab.h:1309 [inline]
snmp6_alloc_dev net/ipv6/addrconf.c:362 [inline]
ipv6_add_dev+0x670/0x1520 net/ipv6/addrconf.c:413
addrconf_notify+0x5db/0x1ba0 net/ipv6/addrconf.c:3685
notifier_call_chain+0x99/0x3f0 kernel/notifier.c:85
call_netdevice_notifiers_info+0xbe/0x110 net/core/dev.c:2250
call_netdevice_notifiers_extack net/core/dev.c:2288 [inline]
call_netdevice_notifiers net/core/dev.c:2302 [inline]
register_netdevice+0x1998/0x25a0 net/core/dev.c:11484
veth_newlink+0x316/0xa00 drivers/net/veth.c:1863
rtnl_newlink_create net/core/rtnetlink.c:3913 [inline]
__rtnl_newlink net/core/rtnetlink.c:4044 [inline]
rtnl_newlink+0x1499/0x2380 net/core/rtnetlink.c:4159
rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:7076
netlink_rcv_skb+0x159/0x420 net/netlink/af_netlink.c:2556
page last free pid 5628 tgid 5628 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1406 [inline]
__free_frozen_pages+0x79f/0x1090 mm/page_alloc.c:2950
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:350
kasan_slab_alloc include/linux/kasan.h:253 [inline]
slab_post_alloc_hook mm/slub.c:4584 [inline]
slab_alloc_node mm/slub.c:4917 [inline]
__kmalloc_cache_noprof+0x265/0x6c0 mm/slub.c:5485
_kmalloc_noprof include/linux/slab.h:988 [inline]
_kzalloc_noprof include/linux/slab.h:1309 [inline]
ref_tracker_alloc+0x190/0x590 lib/ref_tracker.c:270
__netdev_tracker_alloc include/linux/netdevice.h:4499 [inline]
netdev_hold include/linux/netdevice.h:4528 [inline]
netdev_hold include/linux/netdevice.h:4523 [inline]
netdev_queue_add_kobject net/core/net-sysfs.c:1973 [inline]
netdev_queue_update_kobjects+0x2db/0x6f0 net/core/net-sysfs.c:2035
register_queue_kobjects net/core/net-sysfs.c:2098 [inline]
netdev_register_kobject+0x2b3/0x3d0 net/core/net-sysfs.c:2341
register_netdevice+0x15b6/0x25a0 net/core/dev.c:11446
veth_newlink+0x316/0xa00 drivers/net/veth.c:1863
rtnl_newlink_create net/core/rtnetlink.c:3913 [inline]
__rtnl_newlink net/core/rtnetlink.c:4044 [inline]
rtnl_newlink+0x1499/0x2380 net/core/rtnetlink.c:4159
rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:7076
netlink_rcv_skb+0x159/0x420 net/netlink/af_netlink.c:2556
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x585/0x850 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x8b0/0xda0 net/netlink/af_netlink.c:1900
sock_sendmsg_nosec net/socket.c:775 [inline]
__sock_sendmsg net/socket.c:790 [inline]
__sys_sendto+0x48b/0x4e0 net/socket.c:2252
Memory state around the buggy address:
ffff88807c02cc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88807c02cc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88807c02cd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88807c02cd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88807c02ce00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 UID: 0 PID: 21784 Comm: syz.0.3719 Tainted: G B syzkaller #0 PREEMPT(full)
Tainted: [B]=BAD_PAGE
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
RIP: 0010:__hw_addr_flush+0x70/0x250 net/core/dev_addr_lists.c:491
Code: 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 d0 01 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 1e 48 89 da 48 c1 ea 03 <80> 3c 02 00 0f 85 a5 01 00 00 49 bc 00 00 00 00 00 fc ff df 4c 8b
RSP: 0018:ffffc900040f7830 EFLAGS: 00010256
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffc90011a4f000
RDX: 0000000000000000 RSI: ffffffff898fd92a RDI: ffff88807c02c460
RBP: 0000000000000000 R08: 0000000000000006 R09: ffffc90000000000
R10: 0000000000000000 R11: 3d3d3d3d3d3d3d3d R12: ffff88807c02c168
R13: ffff88807bcffc00 R14: ffff88807c02c448 R15: 00000000fffffffc
FS: 00007f39eb86e6c0(0000) GS:ffff888123ede000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000559c4d2dc950 CR3: 0000000075962000 CR4: 0000000000350ef0
Call Trace:
<TASK>
free_netdev+0x25d/0x8c0 net/core/dev.c:12214
gphonet_register_netdev drivers/usb/gadget/function/f_phonet.c:729 [inline]
pn_bind+0x3a7/0x5b0 drivers/usb/gadget/function/f_phonet.c:511
usb_add_function+0x219/0x890 drivers/usb/gadget/composite.c:333
configfs_composite_bind+0xd83/0x1960 drivers/usb/gadget/configfs.c:1802
gadget_bind_driver+0x28c/0xbf0 drivers/usb/gadget/udc/core.c:1662
call_driver_probe drivers/base/dd.c:628 [inline]
really_probe+0x241/0xa60 drivers/base/dd.c:706
__driver_probe_device+0x20e/0x450 drivers/base/dd.c:868
driver_probe_device+0x4a/0x140 drivers/base/dd.c:898
__driver_attach+0x21f/0x5b0 drivers/base/dd.c:1292
bus_for_each_dev+0x13e/0x1d0 drivers/base/bus.c:383
bus_add_driver+0x305/0x5b0 drivers/base/bus.c:763
driver_register+0x1e2/0x360 drivers/base/driver.c:174
usb_gadget_register_driver_owner+0x132/0x210 drivers/usb/gadget/udc/core.c:1752
gadget_dev_desc_UDC_store+0x1b0/0x2e0 drivers/usb/gadget/configfs.c:300
flush_write_buffer fs/configfs/file.c:207 [inline]
configfs_write_iter+0x302/0x4e0 fs/configfs/file.c:229
new_sync_write fs/read_write.c:595 [inline]
vfs_write+0x6ac/0x1050 fs/read_write.c:687
ksys_write+0x12a/0x250 fs/read_write.c:739
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f39ea99de99
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f39eb86e028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f39eac26090 RCX: 00007f39ea99de99
RDX: 000000000000000c RSI: 00002000000004c0 RDI: 0000000000000004
RBP: 00007f39eaa33eaf R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f39eac26128 R14: 00007f39eac26090 R15: 00007ffd7160c058
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__hw_addr_flush+0x70/0x250 net/core/dev_addr_lists.c:491
Code: 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 d0 01 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 1e 48 89 da 48 c1 ea 03 <80> 3c 02 00 0f 85 a5 01 00 00 49 bc 00 00 00 00 00 fc ff df 4c 8b
RSP: 0018:ffffc900040f7830 EFLAGS: 00010256
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffc90011a4f000
RDX: 0000000000000000 RSI: ffffffff898fd92a RDI: ffff88807c02c460
RBP: 0000000000000000 R08: 0000000000000006 R09: ffffc90000000000
R10: 0000000000000000 R11: 3d3d3d3d3d3d3d3d R12: ffff88807c02c168
R13: ffff88807bcffc00 R14: ffff88807c02c448 R15: 00000000fffffffc
FS: 00007f39eb86e6c0(0000) GS:ffff888123ede000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffdf7949ff8 CR3: 0000000075962000 CR4: 0000000000350ef0
----------------
Code disassembly (best guess):
0: 00 00 add %al,(%rax)
2: 00 00 add %al,(%rax)
4: 00 fc add %bh,%ah
6: ff lcall (bad)
7: df 48 c1 fisttps -0x3f(%rax)
a: ea (bad)
b: 03 80 3c 02 00 0f add 0xf00023c(%rax),%eax
11: 85 d0 test %edx,%eax
13: 01 00 add %eax,(%rax)
15: 00 48 b8 add %cl,-0x48(%rax)
18: 00 00 add %al,(%rax)
1a: 00 00 add %al,(%rax)
1c: 00 fc add %bh,%ah
1e: ff lcall (bad)
1f: df 49 8b fisttps -0x75(%rcx)
22: 1e (bad)
23: 48 89 da mov %rbx,%rdx
26: 48 c1 ea 03 shr $0x3,%rdx
* 2a: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) <-- trapping instruction
2e: 0f 85 a5 01 00 00 jne 0x1d9
34: 49 bc 00 00 00 00 00 movabs $0xdffffc0000000000,%r12
3b: fc ff df
3e: 4c rex.WR
3f: 8b .byte 0x8b
---
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
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup