syzbot


KASAN: use-after-free Read in radix_tree_next_chunk

Status: upstream: reported C repro on 2020/01/06 15:45
Reported-by: syzbot+9ccb176dd94d3d649175@syzkaller.appspotmail.com
First crash: 1653d, last: 518d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in radix_tree_next_chunk xfs C 2749 2247d 2299d 5/27 fixed on 2018/06/07 13:52
Fix bisection attempts (8)
Created Duration User Patch Repo Result
2023/02/01 12:32 38m bisect fix linux-4.14.y OK (0) job log log
2022/03/11 00:36 28m bisect fix linux-4.14.y OK (0) job log log
2021/11/12 18:48 27m bisect fix linux-4.14.y OK (0) job log log
2021/10/13 18:20 27m bisect fix linux-4.14.y OK (0) job log log
2021/09/13 17:52 27m bisect fix linux-4.14.y OK (0) job log log
2021/08/14 16:37 26m bisect fix linux-4.14.y OK (0) job log log
2021/07/15 16:14 22m bisect fix linux-4.14.y OK (0) job log log
2021/06/15 15:18 22m bisect fix linux-4.14.y OK (0) job log log

Sample crash report:
IPv6: ADDRCONF(NETDEV_CHANGE): macvtap0: link becomes ready
batman_adv: batadv0: Interface activated: batadv_slave_1
IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready
netlink: 12 bytes leftover after parsing attributes in process `syz-executor192'.
==================================================================
BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:185 [inline]
BUG: KASAN: use-after-free in radix_tree_load_root lib/radix-tree.c:602 [inline]
BUG: KASAN: use-after-free in radix_tree_next_chunk+0x89f/0x8c0 lib/radix-tree.c:1736
Read of size 8 at addr ffff8880b075d148 by task syz-executor192/7972

CPU: 1 PID: 7972 Comm: syz-executor192 Not tainted 4.14.300-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351
 kasan_report mm/kasan/report.c:409 [inline]
 __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:430
 __read_once_size include/linux/compiler.h:185 [inline]
 radix_tree_load_root lib/radix-tree.c:602 [inline]
 radix_tree_next_chunk+0x89f/0x8c0 lib/radix-tree.c:1736
 radix_tree_iter_lookup include/linux/radix-tree.h:440 [inline]
 ida_remove+0x9b/0x210 lib/idr.c:377
 ida_simple_remove+0x31/0x50 lib/idr.c:505
 ipvlan_link_new+0x50c/0xfa0 drivers/net/ipvlan/ipvlan_main.c:648
 rtnl_newlink+0xf7c/0x1830 net/core/rtnetlink.c:2730
 rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4322
 netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2454
 netlink_unicast_kernel net/netlink/af_netlink.c:1296 [inline]
 netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1322
 netlink_sendmsg+0x648/0xbc0 net/netlink/af_netlink.c:1893
 sock_sendmsg_nosec net/socket.c:646 [inline]
 sock_sendmsg+0xb5/0x100 net/socket.c:656
 ___sys_sendmsg+0x6c8/0x800 net/socket.c:2062
 __sys_sendmsg+0xa3/0x120 net/socket.c:2096
 SYSC_sendmsg net/socket.c:2107 [inline]
 SyS_sendmsg+0x27/0x40 net/socket.c:2103
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3

Allocated by task 7972:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551
 kmem_cache_alloc_trace+0x131/0x3d0 mm/slab.c:3618
 kmalloc include/linux/slab.h:488 [inline]
 kzalloc include/linux/slab.h:661 [inline]
 ipvlan_port_create drivers/net/ipvlan/ipvlan_main.c:140 [inline]
 ipvlan_link_new+0x64f/0xfa0 drivers/net/ipvlan/ipvlan_main.c:577
 rtnl_newlink+0xf7c/0x1830 net/core/rtnetlink.c:2730
 rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4322
 netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2454
 netlink_unicast_kernel net/netlink/af_netlink.c:1296 [inline]
 netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1322
 netlink_sendmsg+0x648/0xbc0 net/netlink/af_netlink.c:1893
 sock_sendmsg_nosec net/socket.c:646 [inline]
 sock_sendmsg+0xb5/0x100 net/socket.c:656
 ___sys_sendmsg+0x6c8/0x800 net/socket.c:2062
 __sys_sendmsg+0xa3/0x120 net/socket.c:2096
 SYSC_sendmsg net/socket.c:2107 [inline]
 SyS_sendmsg+0x27/0x40 net/socket.c:2103
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3

Freed by task 7972:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524
 __cache_free mm/slab.c:3496 [inline]
 kfree+0xc9/0x250 mm/slab.c:3815
 ipvlan_uninit+0xb6/0xe0 drivers/net/ipvlan/ipvlan_main.c:244
 register_netdevice+0x7fd/0xe50 net/core/dev.c:7727
 ipvlan_link_new+0x499/0xfa0 drivers/net/ipvlan/ipvlan_main.c:626
 rtnl_newlink+0xf7c/0x1830 net/core/rtnetlink.c:2730
 rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4322
 netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2454
 netlink_unicast_kernel net/netlink/af_netlink.c:1296 [inline]
 netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1322
 netlink_sendmsg+0x648/0xbc0 net/netlink/af_netlink.c:1893
 sock_sendmsg_nosec net/socket.c:646 [inline]
 sock_sendmsg+0xb5/0x100 net/socket.c:656
 ___sys_sendmsg+0x6c8/0x800 net/socket.c:2062
 __sys_sendmsg+0xa3/0x120 net/socket.c:2096
 SYSC_sendmsg net/socket.c:2107 [inline]
 SyS_sendmsg+0x27/0x40 net/socket.c:2103
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3

The buggy address belongs to the object at ffff8880b075c880
 which belongs to the cache kmalloc-4096 of size 4096
The buggy address is located 2248 bytes inside of
 4096-byte region [ffff8880b075c880, ffff8880b075d880)
The buggy address belongs to the page:
page:ffffea0002c1d700 count:1 mapcount:0 mapping:ffff8880b075c880 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffff8880b075c880 0000000000000000 0000000100000001
raw: ffffea000254dea0 ffff88813fe64a48 ffff88813fe74dc0 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880b075d000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880b075d080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880b075d100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                              ^
 ffff8880b075d180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880b075d200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (465):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/11/26 05:18 linux-4.14.y 179ef7fe8677 f4470a7b .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/08/04 19:10 linux-4.14.y b641242202ed 1c9013ac .config console log report syz C ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/05/12 22:43 linux-4.14.y 569d1abf9402 9ad6612a .config console log report syz C ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2020/09/10 21:33 linux-4.14.y 458a534cac0c ac7ca78e .config console log report syz C ci2-linux-4-14
2020/07/23 09:12 linux-4.14.y 69b94dd6dcd1 340ea530 .config console log report syz C ci2-linux-4-14
2020/06/19 05:12 linux-4.14.y b850307b279c bc258b50 .config console log report syz C ci2-linux-4-14
2020/04/15 16:21 linux-4.14.y c10b57a567e4 3f3c5574 .config console log report syz C ci2-linux-4-14
2020/02/29 14:35 linux-4.14.y 78d697fc93f9 c88c7b75 .config console log report syz C ci2-linux-4-14
2020/01/31 05:21 linux-4.14.y 9fa690a2a016 5ed23f9a .config console log report syz C ci2-linux-4-14
2020/01/09 03:34 linux-4.14.y 84f5ad468100 ddc3e859 .config console log report syz C ci2-linux-4-14
2020/01/08 01:03 linux-4.14.y 84f5ad468100 6738e0b3 .config console log report syz C ci2-linux-4-14
2020/01/06 16:12 linux-4.14.y 84f5ad468100 438e1227 .config console log report syz C ci2-linux-4-14
2020/06/14 13:26 linux-4.14.y b850307b279c 2a22c77a .config console log report syz ci2-linux-4-14
2023/02/14 09:39 linux-4.14.y a8ad60f2af58 93ae7e0a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2023/02/02 07:02 linux-4.14.y 3949d1610004 9a6f477c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/12/22 23:49 linux-4.14.y c4215ee4771b 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/12/13 01:17 linux-4.14.y 65afe34ac33d 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/12/12 17:32 linux-4.14.y 65afe34ac33d 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/11/26 02:41 linux-4.14.y 179ef7fe8677 f4470a7b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/10/24 07:41 linux-4.14.y 9d5c0b3a8e1a 23bf86af .config console log report info [disk image] [vmlinux] ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/10/21 04:24 linux-4.14.y 9d5c0b3a8e1a a0fd4dab .config console log report info [disk image] [vmlinux] ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/10/17 01:36 linux-4.14.y 9d5c0b3a8e1a 67cb024c .config console log report info [disk image] [vmlinux] ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/10/17 00:02 linux-4.14.y 9d5c0b3a8e1a 67cb024c .config console log report info [disk image] [vmlinux] ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/09/15 21:28 linux-4.14.y 5df8b4735177 dd9a85ff .config console log report info [disk image] [vmlinux] ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/08/20 20:53 linux-4.14.y b641242202ed 26a13b38 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/08/10 13:28 linux-4.14.y b641242202ed aaa9eaa0 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/08/08 02:05 linux-4.14.y b641242202ed 88e3a122 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/08/04 10:40 linux-4.14.y b641242202ed 1c9013ac .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/07/26 07:38 linux-4.14.y 9c3bf9cf362f 34795c51 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/07/24 15:33 linux-4.14.y 9c3bf9cf362f 22343af4 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/07/03 10:56 linux-4.14.y ed2e96e11936 1434eec0 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/06/30 23:04 linux-4.14.y f051383ef03b 1434eec0 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/06/27 07:16 linux-4.14.y f051383ef03b a371c43c .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/06/24 21:37 linux-4.14.y 84bae26850e3 a371c43c .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/06/09 12:31 linux-4.14.y b8f3be299d51 0d5abf15 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/06/07 18:30 linux-4.14.y b8f3be299d51 b2706118 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/05/17 18:39 linux-4.14.y 690285a9380d 744a39e2 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/05/15 01:39 linux-4.14.y 569d1abf9402 744a39e2 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/05/12 22:18 linux-4.14.y 569d1abf9402 9ad6612a .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/05/01 04:03 linux-4.14.y e3a56aaade89 2df221f6 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/04/10 23:49 linux-4.14.y 74766a973637 e22c3da3 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/04/03 19:15 linux-4.14.y 74766a973637 79a2a8fc .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/02/09 00:36 linux-4.14.y 21ad423fe521 0b33604d .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/01/22 02:44 linux-4.14.y 4ba8e26127c3 214351e1 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/01/20 09:21 linux-4.14.y 4ba8e26127c3 5da9499f .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2022/01/02 09:36 linux-4.14.y a6ca7c65b137 e1768e9c .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2021/12/11 12:59 linux-4.14.y c01d4d1b885d 49ca1f59 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2021/12/08 23:10 linux-4.14.y c01d4d1b885d a4a2a501 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2021/12/06 04:24 linux-4.14.y 66722c42ec91 a617004c .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2021/12/05 12:07 linux-4.14.y 66722c42ec91 a617004c .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2021/11/29 11:55 linux-4.14.y 66722c42ec91 63eeac02 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2021/11/14 10:58 linux-4.14.y 5f9f3b0057d5 75b04091 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2021/05/16 12:39 linux-4.14.y 7d7d1c0ab3eb f54a5c09 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2021/05/07 05:20 linux-4.14.y 7d7d1c0ab3eb 06585184 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2021/05/04 08:01 linux-4.14.y 7d7d1c0ab3eb 09efdd63 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2021/05/04 05:06 linux-4.14.y 7d7d1c0ab3eb 09efdd63 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2021/05/03 19:21 linux-4.14.y 7d7d1c0ab3eb ad61f371 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2021/05/01 12:49 linux-4.14.y 7d7d1c0ab3eb 77e2b668 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in radix_tree_next_chunk
2021/01/17 05:06 linux-4.14.y f79dc86058bc 65a7a854 .config console log report info ci2-linux-4-14
2020/01/06 15:44 linux-4.14.y 84f5ad468100 438e1227 .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.