syzbot


KASAN: global-out-of-bounds Read in nfnetlink_parse_nat_setup

Status: upstream: reported C repro on 2020/01/28 03:04
Reported-by: syzbot+c488fe3c6974b334dc96@syzkaller.appspotmail.com
First crash: 1789d, last: 1541d
Fix bisection the fix commit could be any of (bisect log):
  c6db52a88798 Linux 4.14.183
  56dfe6252c68 Linux 4.14.188
  
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 KASAN: global-out-of-bounds Read in nfnetlink_parse_nat_setup C error 15 1558d 1783d 0/1 upstream: reported C repro on 2020/02/03 22:42
Last patch testing requests (10)
Created Duration User Patch Repo Result
2023/02/04 08:32 14m retest repro linux-4.14.y report log
2023/02/04 07:32 14m retest repro linux-4.14.y report log
2023/02/04 06:32 12m retest repro linux-4.14.y report log
2023/02/04 05:32 10m retest repro linux-4.14.y report log
2023/02/04 04:32 15m retest repro linux-4.14.y report log
2023/02/04 03:32 14m retest repro linux-4.14.y report log
2022/09/13 21:27 12m retest repro linux-4.14.y report log
2022/09/13 19:27 13m retest repro linux-4.14.y report log
2022/09/13 18:27 9m retest repro linux-4.14.y report log
2022/09/13 17:27 9m retest repro linux-4.14.y report log
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2020/07/11 11:49 32m bisect fix linux-4.14.y OK (2) job log
2020/05/18 05:40 26m bisect fix linux-4.14.y OK (0) job log log

Sample crash report:
audit: type=1400 audit(1591447222.218:8): avc:  denied  { execmem } for  pid=6335 comm="syz-executor019" scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=process permissive=1
netlink: 20 bytes leftover after parsing attributes in process `syz-executor019'.
==================================================================
BUG: KASAN: global-out-of-bounds in nfnetlink_parse_nat net/netfilter/nf_nat_core.c:747 [inline]
BUG: KASAN: global-out-of-bounds in nfnetlink_parse_nat_setup+0x373/0x380 net/netfilter/nf_nat_core.c:784
Read of size 8 at addr ffffffff871c7398 by task syz-executor019/6337

CPU: 0 PID: 6337 Comm: syz-executor019 Not tainted 4.14.183-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x283 lib/dump_stack.c:58
 print_address_description.cold+0x5/0x1dc mm/kasan/report.c:252
 kasan_report_error mm/kasan/report.c:351 [inline]
 kasan_report mm/kasan/report.c:409 [inline]
 kasan_report.cold+0xa9/0x2b9 mm/kasan/report.c:393
 nfnetlink_parse_nat net/netfilter/nf_nat_core.c:747 [inline]
 nfnetlink_parse_nat_setup+0x373/0x380 net/netfilter/nf_nat_core.c:784
 ctnetlink_parse_nat_setup+0x70/0x490 net/netfilter/nf_conntrack_netlink.c:1421
 ctnetlink_setup_nat net/netfilter/nf_conntrack_netlink.c:1496 [inline]
 ctnetlink_create_conntrack+0x477/0x1040 net/netfilter/nf_conntrack_netlink.c:1840
 ctnetlink_new_conntrack+0x45f/0xbf4 net/netfilter/nf_conntrack_netlink.c:1964
 nfnetlink_rcv_msg+0x9e1/0xc00 net/netfilter/nfnetlink.c:214
 netlink_rcv_skb+0x127/0x370 net/netlink/af_netlink.c:2433
 nfnetlink_rcv+0x1ab/0x1650 net/netfilter/nfnetlink.c:515
 netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline]
 netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1313
 netlink_sendmsg+0x64a/0xbb0 net/netlink/af_netlink.c:1878
 sock_sendmsg_nosec net/socket.c:646 [inline]
 sock_sendmsg+0xb5/0x100 net/socket.c:656
 sock_no_sendpage+0xe5/0x110 net/core/sock.c:2572
 kernel_sendpage+0x82/0xd0 net/socket.c:3407
 sock_sendpage+0x84/0xa0 net/socket.c:871
 pipe_to_sendpage+0x226/0x2d0 fs/splice.c:451
 splice_from_pipe_feed fs/splice.c:502 [inline]
 __splice_from_pipe+0x332/0x740 fs/splice.c:626
 splice_from_pipe+0xc6/0x120 fs/splice.c:661
 do_splice_from fs/splice.c:851 [inline]
 do_splice fs/splice.c:1147 [inline]
 SYSC_splice fs/splice.c:1402 [inline]
 SyS_splice+0xca0/0x1230 fs/splice.c:1382
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x445959
RSP: 002b:00007f50a4df8d88 EFLAGS: 00000246 ORIG_RAX: 0000000000000113
RAX: ffffffffffffffda RBX: 00000000006dac58 RCX: 0000000000445959
RDX: 0000000000000005 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 00000000006dac50 R08: 000000000004ffe0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dac5c
R13: 00000000004ade28 R14: 0000000000000006 R15: 0000000000000018

The buggy address belongs to the variable:
 nft_quota_ops+0xb8/0xc0

Memory state around the buggy address:
 ffffffff871c7280: 00 00 00 00 00 00 fa fa fa fa fa fa 00 00 00 00
 ffffffff871c7300: 00 00 00 00 00 00 00 fa fa fa fa fa 06 fa fa fa
>ffffffff871c7380: fa fa fa fa 00 00 00 00 00 00 fa fa fa fa fa fa
                            ^
 ffffffff871c7400: 00 00 00 00 00 00 00 00 00 00 fa fa fa fa fa fa
 ffffffff871c7480: 00 00 00 03 fa fa fa fa 04 fa fa fa fa fa fa fa
==================================================================

Crashes (45):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/06/06 12:42 linux-4.14.y c6db52a88798 c3e9afb3 .config console log report syz C ci2-linux-4-14
2020/04/18 05:40 linux-4.14.y c10b57a567e4 435c6d53 .config console log report syz C ci2-linux-4-14
2020/04/18 05:19 linux-4.14.y c10b57a567e4 435c6d53 .config console log report syz C ci2-linux-4-14
2020/03/08 17:53 linux-4.14.y 78d697fc93f9 2e9971bb .config console log report syz C ci2-linux-4-14
2020/02/29 09:48 linux-4.14.y 78d697fc93f9 c88c7b75 .config console log report syz C ci2-linux-4-14
2020/01/28 03:19 linux-4.14.y 9a95f25269bd 56cd6c9b .config console log report syz C ci2-linux-4-14
2020/10/02 10:46 linux-4.14.y cbfa1702aaf6 9602ddf4 .config console log report info ci2-linux-4-14
2020/09/30 04:31 linux-4.14.y cbfa1702aaf6 5abc3f1a .config console log report info ci2-linux-4-14
2020/09/28 10:12 linux-4.14.y cbfa1702aaf6 6bfdbe89 .config console log report info ci2-linux-4-14
2020/09/11 04:50 linux-4.14.y 458a534cac0c ac7ca78e .config console log report ci2-linux-4-14
2020/09/11 01:27 linux-4.14.y 458a534cac0c ac7ca78e .config console log report ci2-linux-4-14
2020/09/10 14:55 linux-4.14.y 458a534cac0c ac7ca78e .config console log report ci2-linux-4-14
2020/09/09 16:49 linux-4.14.y 2f166cdcf8a9 0ea7a887 .config console log report ci2-linux-4-14
2020/09/09 11:02 linux-4.14.y 2f166cdcf8a9 0ea7a887 .config console log report ci2-linux-4-14
2020/09/09 00:01 linux-4.14.y 2f166cdcf8a9 abf9ba4f .config console log report ci2-linux-4-14
2020/09/07 18:34 linux-4.14.y 2f166cdcf8a9 abf9ba4f .config console log report ci2-linux-4-14
2020/09/07 17:15 linux-4.14.y 2f166cdcf8a9 abf9ba4f .config console log report ci2-linux-4-14
2020/09/07 10:43 linux-4.14.y 2f166cdcf8a9 abf9ba4f .config console log report ci2-linux-4-14
2020/09/07 01:55 linux-4.14.y 2f166cdcf8a9 abf9ba4f .config console log report ci2-linux-4-14
2020/09/06 22:40 linux-4.14.y 2f166cdcf8a9 abf9ba4f .config console log report ci2-linux-4-14
2020/09/06 18:47 linux-4.14.y 2f166cdcf8a9 abf9ba4f .config console log report ci2-linux-4-14
2020/09/04 16:25 linux-4.14.y 2f166cdcf8a9 abf9ba4f .config console log report ci2-linux-4-14
2020/09/03 13:44 linux-4.14.y 2f166cdcf8a9 abf9ba4f .config console log report ci2-linux-4-14
2020/09/03 00:04 linux-4.14.y d7e78d08fa77 abf9ba4f .config console log report ci2-linux-4-14
2020/09/02 10:32 linux-4.14.y d7e78d08fa77 abf9ba4f .config console log report ci2-linux-4-14
2020/09/01 22:44 linux-4.14.y d7e78d08fa77 abf9ba4f .config console log report ci2-linux-4-14
2020/08/25 05:09 linux-4.14.y 6a24ca2506d6 344da168 .config console log report ci2-linux-4-14
2020/08/24 10:07 linux-4.14.y 6a24ca2506d6 cef5ae68 .config console log report ci2-linux-4-14
2020/08/24 09:31 linux-4.14.y 6a24ca2506d6 cef5ae68 .config console log report ci2-linux-4-14
2020/06/11 10:14 linux-4.14.y b850307b279c 3ab7a05a .config console log report ci2-linux-4-14
2020/06/11 10:05 linux-4.14.y b850307b279c 3ab7a05a .config console log report ci2-linux-4-14
2020/06/06 11:38 linux-4.14.y c6db52a88798 c3e9afb3 .config console log report ci2-linux-4-14
2020/05/29 10:56 linux-4.14.y 4f68020fef1c d19ed305 .config console log report ci2-linux-4-14
2020/04/02 18:45 linux-4.14.y 4520f06b03ae a34e2c33 .config console log report ci2-linux-4-14
2020/03/14 18:30 linux-4.14.y 12cd844a39ed 749688d2 .config console log report ci2-linux-4-14
2020/02/24 11:39 linux-4.14.y 98db2bf27b9e 1253d6f0 .config console log report ci2-linux-4-14
2020/02/23 13:29 linux-4.14.y 98db2bf27b9e 2c36e7a7 .config console log report ci2-linux-4-14
2020/02/23 13:29 linux-4.14.y 98db2bf27b9e 2c36e7a7 .config console log report ci2-linux-4-14
2020/02/23 12:58 linux-4.14.y 98db2bf27b9e 2c36e7a7 .config console log report ci2-linux-4-14
2020/02/22 13:37 linux-4.14.y 98db2bf27b9e 2c36e7a7 .config console log report ci2-linux-4-14
2020/02/22 13:32 linux-4.14.y 98db2bf27b9e 2c36e7a7 .config console log report ci2-linux-4-14
2020/02/22 13:27 linux-4.14.y 98db2bf27b9e 2c36e7a7 .config console log report ci2-linux-4-14
2020/02/17 11:10 linux-4.14.y 98db2bf27b9e 1f448cd6 .config console log report ci2-linux-4-14
2020/02/13 21:08 linux-4.14.y e0f8b8a65a47 e6247653 .config console log report ci2-linux-4-14
2020/01/28 03:03 linux-4.14.y 9a95f25269bd 56cd6c9b .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.