syzbot


KASAN: slab-out-of-bounds Read in xt_find_match

Status: upstream: reported C repro on 2020/03/15 05:47
Reported-by: syzbot+550057e28c995e48263d@syzkaller.appspotmail.com
First crash: 1474d, last: 399d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 KASAN: use-after-free Read in xt_find_match C error 4 448d 1294d 0/1 upstream: reported C repro on 2020/09/11 02:31
Fix bisection attempts (3)
Created Duration User Patch Repo Result
2020/06/13 08:31 0m bisect fix linux-4.19.y error job log (0)
2020/05/14 06:42 27m bisect fix linux-4.19.y job log (0) log
2020/04/14 06:16 25m bisect fix linux-4.19.y job log (0) log

Sample crash report:
IPVS: ftp: loaded support on port[0] = 21
netlink: 4 bytes leftover after parsing attributes in process `syz-executor325'.
==================================================================
BUG: KASAN: slab-out-of-bounds in __lock_acquire+0x2cb4/0x3ff0 kernel/locking/lockdep.c:3295
Read of size 8 at addr ffff8880a4dcf420 by task syz-executor325/8129

CPU: 0 PID: 8129 Comm: syz-executor325 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256
 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354
 kasan_report mm/kasan/report.c:412 [inline]
 __asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433
 __lock_acquire+0x2cb4/0x3ff0 kernel/locking/lockdep.c:3295
 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908
 __mutex_lock_common kernel/locking/mutex.c:937 [inline]
 __mutex_lock+0xd7/0x1190 kernel/locking/mutex.c:1078
 xt_find_match net/netfilter/x_tables.c:189 [inline]
 xt_find_match+0xa3/0x280 net/netfilter/x_tables.c:181
 xt_request_find_match net/netfilter/x_tables.c:219 [inline]
 xt_request_find_match+0x88/0x110 net/netfilter/x_tables.c:212
 get_xt_match net/sched/em_ipt.c:112 [inline]
 em_ipt_change+0x1c7/0x470 net/sched/em_ipt.c:132
 tcf_em_validate net/sched/ematch.c:248 [inline]
 tcf_em_tree_validate net/sched/ematch.c:365 [inline]
 tcf_em_tree_validate+0x8fa/0xea0 net/sched/ematch.c:307
 basic_set_parms net/sched/cls_basic.c:155 [inline]
 basic_change+0x1173/0x1260 net/sched/cls_basic.c:212
 tc_new_tfilter+0xb52/0x16c0 net/sched/cls_api.c:1320
 rtnetlink_rcv_msg+0x453/0xb80 net/core/rtnetlink.c:4782
 netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2463
 netlink_unicast_kernel net/netlink/af_netlink.c:1325 [inline]
 netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1351
 netlink_sendmsg+0x6c3/0xc50 net/netlink/af_netlink.c:1917
 sock_sendmsg_nosec net/socket.c:651 [inline]
 sock_sendmsg+0xc3/0x120 net/socket.c:661
 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2227
 __sys_sendmsg net/socket.c:2265 [inline]
 __do_sys_sendmsg net/socket.c:2274 [inline]
 __se_sys_sendmsg net/socket.c:2272 [inline]
 __x64_sys_sendmsg+0x132/0x220 net/socket.c:2272
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f7c8d4216a9
Code: 28 c3 e8 4a 15 00 00 66 2e 0f 1f 84 00 00 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff7c1d0578 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f7c8d48eed0 RCX: 00007f7c8d4216a9
RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000003
RBP: 00007fff7c1d0588 R08: 00007f7c8d48ee40 R09: 00007f7c8d48ee40
R10: 00007f7c8d48ee40 R11: 0000000000000246 R12: 00007fff7c1d0590
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000

Allocated by task 1:
 kmem_cache_alloc_trace+0x12f/0x380 mm/slab.c:3625
 kmalloc include/linux/slab.h:515 [inline]
 kmalloc_array include/linux/slab.h:636 [inline]
 kcalloc include/linux/slab.h:648 [inline]
 xt_init+0x128/0x2a9 net/netfilter/x_tables.c:1898
 do_one_initcall+0xf1/0x740 init/main.c:884
 do_initcall_level init/main.c:952 [inline]
 do_initcalls init/main.c:960 [inline]
 do_basic_setup init/main.c:978 [inline]
 kernel_init_freeable+0x9c5/0xab7 init/main.c:1145
 kernel_init+0xd/0x1ba init/main.c:1062
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415

Freed by task 0:
(stack is not available)

The buggy address belongs to the object at ffff8880a4dce0c0
 which belongs to the cache kmalloc-4096 of size 4096
The buggy address is located 864 bytes to the right of
 4096-byte region [ffff8880a4dce0c0, ffff8880a4dcf0c0)
The buggy address belongs to the page:
page:ffffea0002937380 count:1 mapcount:0 mapping:ffff88813bff0dc0 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffffea0002937308 ffffea0002937708 ffff88813bff0dc0
raw: 0000000000000000 ffff8880a4dce0c0 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880a4dcf300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880a4dcf380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880a4dcf400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                               ^
 ffff8880a4dcf480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880a4dcf500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (29):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/04 17:51 linux-4.19.y 3f8a27f9e27b 1dac8c7a .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Read in xt_find_match
2022/10/01 11:41 linux-4.19.y 3f8a27f9e27b feb56351 .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Read in xt_find_match
2022/06/18 13:12 linux-4.19.y 3f8a27f9e27b 8f633d84 .config console log report syz C ci2-linux-4-19 KASAN: slab-out-of-bounds Read in xt_find_match
2022/05/26 23:00 linux-4.19.y 3f8a27f9e27b 3037caa9 .config console log report syz C ci2-linux-4-19 BUG: unable to handle kernel paging request in xt_find_match
2020/09/12 01:19 linux-4.19.y 67957f12548c 79fb24e2 .config console log report syz C ci2-linux-4-19
2020/03/15 06:16 linux-4.19.y 569209711609 749688d2 .config console log report syz C ci2-linux-4-19
2023/02/23 08:03 linux-4.19.y 3f8a27f9e27b 9f1e2cb3 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Read in xt_find_match
2023/02/22 19:05 linux-4.19.y 3f8a27f9e27b 9f1e2cb3 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Read in xt_find_match
2023/02/19 16:29 linux-4.19.y 3f8a27f9e27b bcdf85f8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Read in xt_find_match
2023/02/19 13:28 linux-4.19.y 3f8a27f9e27b bcdf85f8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Read in xt_find_match
2023/02/18 22:15 linux-4.19.y 3f8a27f9e27b d02e9a70 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Read in xt_find_match
2023/02/18 19:29 linux-4.19.y 3f8a27f9e27b d02e9a70 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Read in xt_find_match
2023/02/05 13:47 linux-4.19.y 3f8a27f9e27b be607b78 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Read in xt_find_match
2022/12/03 03:08 linux-4.19.y 3f8a27f9e27b e080de16 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Read in xt_find_match
2022/11/30 01:37 linux-4.19.y 3f8a27f9e27b 579a3740 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Read in xt_find_match
2022/10/18 17:21 linux-4.19.y 3f8a27f9e27b b31320fc .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Read in xt_find_match
2022/10/07 22:56 linux-4.19.y 3f8a27f9e27b 79a59635 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Read in xt_find_match
2022/10/01 11:20 linux-4.19.y 3f8a27f9e27b feb56351 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Read in xt_find_match
2022/09/16 10:18 linux-4.19.y 3f8a27f9e27b dd9a85ff .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Read in xt_find_match
2022/09/10 16:15 linux-4.19.y 3f8a27f9e27b 356d8217 .config console log report info ci2-linux-4-19 KASAN: slab-out-of-bounds Read in xt_find_match
2022/09/03 01:10 linux-4.19.y 3f8a27f9e27b 25194605 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Read in xt_find_match
2022/08/30 01:36 linux-4.19.y 3f8a27f9e27b d7593c58 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: slab-out-of-bounds Read in xt_find_match
2022/08/13 18:38 linux-4.19.y 3f8a27f9e27b 8dfcaa3d .config console log report info ci2-linux-4-19 KASAN: slab-out-of-bounds Read in xt_find_match
2022/07/13 10:00 linux-4.19.y 3f8a27f9e27b 5d921b08 .config console log report info ci2-linux-4-19 KASAN: slab-out-of-bounds Read in xt_find_match
2022/07/09 20:13 linux-4.19.y 3f8a27f9e27b b5765a15 .config console log report info ci2-linux-4-19 KASAN: slab-out-of-bounds Read in xt_find_match
2021/12/02 19:53 linux-4.19.y 3f8a27f9e27b 61f86278 .config console log report info ci2-linux-4-19 KASAN: slab-out-of-bounds Read in xt_find_match
2022/11/12 02:41 linux-4.19.y 3f8a27f9e27b f42ee5d8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 general protection fault in xt_find_match
2022/05/26 22:38 linux-4.19.y 3f8a27f9e27b 3037caa9 .config console log report info ci2-linux-4-19 BUG: unable to handle kernel paging request in xt_find_match
2020/03/15 05:46 linux-4.19.y 569209711609 749688d2 .config console log report ci2-linux-4-19
* Struck through repros no longer work on HEAD.