syzbot


KASAN: use-after-free Read in __dev_queue_xmit (4)

Status: auto-closed as invalid on 2020/10/23 09:56
Subsystems: block
[Documentation on labels]
First crash: 1593d, last: 1593d
Similar bugs (9)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-49 KASAN: use-after-free Read in __dev_queue_xmit C 46 1840d 2063d 0/3 public: reported C repro on 2019/04/13 00:00
upstream KASAN: use-after-free Read in __dev_queue_xmit (5) block C unreliable error 49 278d 1157d 0/28 upstream: reported C repro on 2021/10/04 21:37
upstream KASAN: use-after-free Read in __dev_queue_xmit (2) net C 2 2390d 2390d 5/28 fixed on 2018/06/07 13:52
upstream KASAN: use-after-free Read in __dev_queue_xmit (3) net 11 2256d 2260d 11/28 fixed on 2018/11/12 21:25
linux-6.1 KASAN: use-after-free Read in __dev_queue_xmit origin:upstream C error 2 222d 585d 0/3 upstream: reported C repro on 2023/04/29 13:33
linux-5.15 KASAN: use-after-free Read in __dev_queue_xmit origin:upstream missing-backport C error 3 306d 556d 0/3 upstream: reported C repro on 2023/05/28 17:42
linux-4.19 KASAN: use-after-free Read in __dev_queue_xmit C error 15 643d 1315d 0/1 upstream: reported C repro on 2021/04/30 04:08
upstream KASAN: use-after-free Read in __dev_queue_xmit net C 10 2408d 2527d 5/28 fixed on 2018/05/09 07:47
linux-4.14 KASAN: use-after-free Read in __dev_queue_xmit C error 1 817d 1028d 0/1 upstream: reported C repro on 2022/02/10 06:42

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in __dev_queue_xmit+0x2982/0x2d60 net/core/dev.c:4096
Read of size 8 at addr ffff8881f1481008 by task aoe_tx0/2686

CPU: 0 PID: 2686 Comm: aoe_tx0 Not tainted 5.8.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x18f/0x20d lib/dump_stack.c:118
 print_address_description.constprop.0.cold+0xae/0x436 mm/kasan/report.c:383
 __kasan_report mm/kasan/report.c:513 [inline]
 kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530
 __dev_queue_xmit+0x2982/0x2d60 net/core/dev.c:4096
 tx+0x68/0xb0 drivers/block/aoe/aoenet.c:63
 kthread+0x1e2/0x3a0 drivers/block/aoe/aoecmd.c:1239
 kthread+0x3b5/0x4a0 kernel/kthread.c:291
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293

Allocated by task 32554:
 save_stack+0x1b/0x40 mm/kasan/common.c:48
 set_track mm/kasan/common.c:56 [inline]
 __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:494
 kmalloc_node include/linux/slab.h:578 [inline]
 kvmalloc_node+0x61/0xf0 mm/util.c:574
 kvmalloc include/linux/mm.h:753 [inline]
 kvzalloc include/linux/mm.h:761 [inline]
 netif_alloc_netdev_queues net/core/dev.c:9369 [inline]
 alloc_netdev_mqs+0x6eb/0xdc0 net/core/dev.c:9984
 rtnl_create_link+0x219/0xad0 net/core/rtnetlink.c:3067
 __rtnl_newlink+0xfa0/0x1750 net/core/rtnetlink.c:3329
 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3398
 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5461
 netlink_rcv_skb+0x15a/0x430 net/netlink/af_netlink.c:2469
 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline]
 netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1329
 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1918
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:672
 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2352
 ___sys_sendmsg+0xf3/0x170 net/socket.c:2406
 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2439
 do_syscall_64+0x60/0xe0 arch/x86/entry/common.c:384
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Freed by task 32554:
 save_stack+0x1b/0x40 mm/kasan/common.c:48
 set_track mm/kasan/common.c:56 [inline]
 kasan_set_free_info mm/kasan/common.c:316 [inline]
 __kasan_slab_free+0xf5/0x140 mm/kasan/common.c:455
 __cache_free mm/slab.c:3426 [inline]
 kfree+0x103/0x2c0 mm/slab.c:3757
 kvfree+0x42/0x50 mm/util.c:603
 netif_free_tx_queues net/core/dev.c:9357 [inline]
 free_netdev+0x57/0x480 net/core/dev.c:10028
 netdev_run_todo+0x88e/0xac0 net/core/dev.c:9788
 rtnl_unlock net/core/rtnetlink.c:112 [inline]
 rtnetlink_rcv_msg+0x45b/0xad0 net/core/rtnetlink.c:5462
 netlink_rcv_skb+0x15a/0x430 net/netlink/af_netlink.c:2469
 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline]
 netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1329
 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1918
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:672
 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2352
 ___sys_sendmsg+0xf3/0x170 net/socket.c:2406
 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2439
 do_syscall_64+0x60/0xe0 arch/x86/entry/common.c:384
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

The buggy address belongs to the object at ffff8881f1481000
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 8 bytes inside of
 512-byte region [ffff8881f1481000, ffff8881f1481200)
The buggy address belongs to the page:
page:ffffea0007c52040 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0
flags: 0x57ffe0000000200(slab)
raw: 057ffe0000000200 ffffea0008019348 ffffea0007cfdec8 ffff8880aa000a80
raw: 0000000000000000 ffff8881f1481000 0000000100000004 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8881f1480f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8881f1480f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8881f1481000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                      ^
 ffff8881f1481080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8881f1481100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/07/25 09:54 net-old c2c633106453 1f7cc1ca .config console log report ci-upstream-net-this-kasan-gce
* Struck through repros no longer work on HEAD.