bisecting cause commit starting from 864db232dc7036aa2de19749c3d5be0143b24f8f building syzkaller on 6a81331a1d4c744da9204d02ec88d558f7eea9c9 testing commit 864db232dc7036aa2de19749c3d5be0143b24f8f with gcc (GCC) 10.2.1 20210217 kernel signature: d268092d5fa29bd48a95096fd32f52a576c15f5d7da80337413019227c44d883 all runs: crashed: divide error in nft_limit_init testing release v5.11 testing commit f40ddce88593482919761f74910f42f4b84c004b with gcc (GCC) 10.2.1 20210217 kernel signature: e99cd9f143ce9d9fcac692e506c1f42fd7bad007e669bcc2d658384620d3ab58 all runs: crashed: divide error in nft_limit_init testing release v5.10 testing commit 2c85ebc57b3e1817b6ce1a6b703928e113a90442 with gcc (GCC) 10.2.1 20210217 kernel signature: a85323b0701dba111ac583b145ff31def09d195ee905600b53b701659a53318a all runs: crashed: UBSAN: division-overflow in nft_limit_init testing release v5.9 testing commit bbf5c979011a099af5dc76498918ed7df445635b with gcc (GCC) 10.2.1 20210217 kernel signature: 518fb1aeda7a24ee3d4efae5c88e23f29027cd3df6defd6a587437de3d25454c all runs: crashed: UBSAN: division-overflow in nft_limit_init testing release v5.8 testing commit bcf876870b95592b52519ed4aafcf9d95999bc9c with gcc (GCC) 8.4.1 20210217 kernel signature: 3fd984bc16d47748b5999bb31f87b0aa7ef3d85d1c8c75dc2d70718fb8c8fd1c all runs: crashed: UBSAN: division-overflow in nft_limit_init testing release v5.7 testing commit 3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162 with gcc (GCC) 8.4.1 20210217 kernel signature: 3ea098051d234c6402a881adaad943a392da5cd3d368c594f1a49fd42c6aee29 run #0: crashed: UBSAN: division-overflow in nft_limit_init run #1: crashed: UBSAN: division-overflow in nft_limit_init run #2: crashed: UBSAN: division-overflow in nft_limit_init run #3: crashed: UBSAN: division-overflow in nft_limit_init run #4: crashed: UBSAN: division-overflow in nft_limit_init run #5: crashed: UBSAN: division-overflow in nft_limit_init run #6: crashed: UBSAN: division-overflow in nft_limit_init run #7: crashed: UBSAN: division-overflow in nft_limit_init run #8: crashed: UBSAN: division-overflow in nft_limit_init run #9: boot failed: can't ssh into the instance testing release v5.6 testing commit 7111951b8d4973bda27ff663f2cf18b663d15b48 with gcc (GCC) 8.4.1 20210217 kernel signature: b4075d9dcea9f7c6d6766bd389db2270bfa11bf026e4af423b09b01ea5327549 all runs: OK # git bisect start 3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162 7111951b8d4973bda27ff663f2cf18b663d15b48 Bisecting: 7542 revisions left to test after this (roughly 13 steps) [50a5de895dbe5df947b3a695777db5b2c313e065] Merge tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma testing commit 50a5de895dbe5df947b3a695777db5b2c313e065 with gcc (GCC) 8.4.1 20210217 kernel signature: e3d85b49e6dc19e9fe585e00bd1bcbc784ac8554d20346c872921bf5dc710a93 all runs: boot failed: kernel panic: VFS: Unable to mount root fs on unknown-block(8,1) # git bisect skip 50a5de895dbe5df947b3a695777db5b2c313e065 Bisecting: 7542 revisions left to test after this (roughly 13 steps) [422c032afcf57d5e8109a54912e22ffc53d99068] netfilter: flowtable: Use rw sem as flow block lock testing commit 422c032afcf57d5e8109a54912e22ffc53d99068 with gcc (GCC) 8.4.1 20210217 kernel signature: e72d13c86c593b696e101b26ccebd1d095b12299396d46ba888470994d819105 all runs: crashed: UBSAN: undefined-behaviour in nft_limit_init # git bisect bad 422c032afcf57d5e8109a54912e22ffc53d99068 Bisecting: 771 revisions left to test after this (roughly 10 steps) [6349021701d0ba2e84e2be440258d81e198c3392] Merge branch 'mlxsw-Offload-FIFO' testing commit 6349021701d0ba2e84e2be440258d81e198c3392 with gcc (GCC) 8.4.1 20210217 kernel signature: b8962e72551d4d8c3adeea2809dd72e425eb0515d7a0273743651d8b9f483b65 all runs: OK # git bisect good 6349021701d0ba2e84e2be440258d81e198c3392 Bisecting: 385 revisions left to test after this (roughly 9 steps) [d5e3c87d302cd08d01ac041cc3f8049c979cb97d] net: fec: reject unsupported coalescing params testing commit d5e3c87d302cd08d01ac041cc3f8049c979cb97d with gcc (GCC) 8.4.1 20210217 kernel signature: 2f0cbe51ef9a78d60325955cac406fc3b6f3ebc83e660258b67bcac21f1ff6ef all runs: OK # git bisect good d5e3c87d302cd08d01ac041cc3f8049c979cb97d Bisecting: 192 revisions left to test after this (roughly 8 steps) [fa83820e5c58d200f41d08003ecb5f61cad3113b] Merge branch 'net-phy-XLGMII-define-and-usage-in-PHYLINK' testing commit fa83820e5c58d200f41d08003ecb5f61cad3113b with gcc (GCC) 8.4.1 20210217 kernel signature: c2cb6534e44f89bd820c72dd270fb4e164d7e3ba6de4ceadb5a4926ab3f32bb3 all runs: OK # git bisect good fa83820e5c58d200f41d08003ecb5f61cad3113b Bisecting: 96 revisions left to test after this (roughly 7 steps) [0419c450e1bb5eb1c68ba10efeefddaf556cde85] Merge branch 'stmmac-100GB-Enterprise-MAC-support' testing commit 0419c450e1bb5eb1c68ba10efeefddaf556cde85 with gcc (GCC) 8.4.1 20210217 kernel signature: b993937ec8b7440ac0438eb69d2ce12d02e23f095edb1c146095e8aa84dec056 all runs: OK # git bisect good 0419c450e1bb5eb1c68ba10efeefddaf556cde85 Bisecting: 47 revisions left to test after this (roughly 6 steps) [54e73b9c0a88f71ce041a69471b7c4ef9a6a4407] s390/qeth: don't report hard-coded driver version testing commit 54e73b9c0a88f71ce041a69471b7c4ef9a6a4407 with gcc (GCC) 8.4.1 20210217 kernel signature: 48262e0af5414b94f4a041f51360bfb38f96c447f316711b70374bbda6628978 all runs: OK # git bisect good 54e73b9c0a88f71ce041a69471b7c4ef9a6a4407 Bisecting: 29 revisions left to test after this (roughly 5 steps) [d445dff2df604e6c21480782f434f44128d06f1d] net: phy: realtek: read actual speed to detect downshift testing commit d445dff2df604e6c21480782f434f44128d06f1d with gcc (GCC) 8.4.1 20210217 kernel signature: c077ab99195db6a7f9914379ba83daaaa23653b6c7ed05c243ff556fec04dcbc all runs: OK # git bisect good d445dff2df604e6c21480782f434f44128d06f1d Bisecting: 14 revisions left to test after this (roughly 4 steps) [79e28519ac78dde6d38fe6ea22286af574f5c7db] Merge tag 'mlx5-updates-2020-03-17' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux testing commit 79e28519ac78dde6d38fe6ea22286af574f5c7db with gcc (GCC) 8.4.1 20210217 kernel signature: c077ab99195db6a7f9914379ba83daaaa23653b6c7ed05c243ff556fec04dcbc all runs: OK # git bisect good 79e28519ac78dde6d38fe6ea22286af574f5c7db Bisecting: 7 revisions left to test after this (roughly 3 steps) [19f8f717f620576ada10b0ba8f4d55ef1208571e] netfilter: ctnetlink: Add missing annotation for ctnetlink_parse_nat_setup() testing commit 19f8f717f620576ada10b0ba8f4d55ef1208571e with gcc (GCC) 8.4.1 20210217 kernel signature: b2026ecb8b780cf5aee672f477917dfbf8982a251c44e6832e34c0ce3eb3953a run #0: crashed: UBSAN: undefined-behaviour in nft_limit_init run #1: crashed: UBSAN: undefined-behaviour in nft_limit_init run #2: crashed: UBSAN: undefined-behaviour in nft_limit_init run #3: crashed: UBSAN: undefined-behaviour in nft_limit_init run #4: crashed: UBSAN: undefined-behaviour in nft_limit_init run #5: crashed: UBSAN: undefined-behaviour in nft_limit_init run #6: crashed: UBSAN: undefined-behaviour in nft_limit_init run #7: crashed: UBSAN: undefined-behaviour in nft_limit_init run #8: crashed: divide error in nft_limit_init run #9: boot failed: can't ssh into the instance # git bisect bad 19f8f717f620576ada10b0ba8f4d55ef1208571e Bisecting: 3 revisions left to test after this (roughly 2 steps) [65038428b2c6c5be79d3f78a6b79c0cdc3a58a41] netfilter: nf_tables: allow to specify stateful expression in set definition testing commit 65038428b2c6c5be79d3f78a6b79c0cdc3a58a41 with gcc (GCC) 8.4.1 20210217 kernel signature: 04531037373dbf10873e2ae6be6ec3a64eb1987b121faf4fa058addbb8316a31 all runs: crashed: UBSAN: undefined-behaviour in nft_limit_init # git bisect bad 65038428b2c6c5be79d3f78a6b79c0cdc3a58a41 Bisecting: 0 revisions left to test after this (roughly 1 step) [0c2a85edd143162b3a698f31e94bf8cdc041da87] netfilter: nf_tables: pass context to nft_set_destroy() testing commit 0c2a85edd143162b3a698f31e94bf8cdc041da87 with gcc (GCC) 8.4.1 20210217 kernel signature: b399a7ccd935b0e00298a1634333788db43dd36c452cf2d85da5df36cb8ce034 all runs: OK # git bisect good 0c2a85edd143162b3a698f31e94bf8cdc041da87 65038428b2c6c5be79d3f78a6b79c0cdc3a58a41 is the first bad commit commit 65038428b2c6c5be79d3f78a6b79c0cdc3a58a41 Author: Pablo Neira Ayuso Date: Tue Mar 17 14:13:46 2020 +0100 netfilter: nf_tables: allow to specify stateful expression in set definition This patch allows users to specify the stateful expression for the elements in this set via NFTA_SET_EXPR. This new feature allows you to turn on counters for all of the elements in this set. Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_tables.h | 2 ++ include/uapi/linux/netfilter/nf_tables.h | 2 ++ net/netfilter/nf_tables_api.c | 60 +++++++++++++++++++++++++------- 3 files changed, 52 insertions(+), 12 deletions(-) culprit signature: 04531037373dbf10873e2ae6be6ec3a64eb1987b121faf4fa058addbb8316a31 parent signature: b399a7ccd935b0e00298a1634333788db43dd36c452cf2d85da5df36cb8ce034 revisions tested: 19, total time: 4h33m25.790453037s (build: 2h17m41.895603862s, test: 2h13m5.555422608s) first bad commit: 65038428b2c6c5be79d3f78a6b79c0cdc3a58a41 netfilter: nf_tables: allow to specify stateful expression in set definition recipients (to): ["coreteam@netfilter.org" "davem@davemloft.net" "fw@strlen.de" "kadlec@netfilter.org" "kuba@kernel.org" "netdev@vger.kernel.org" "netfilter-devel@vger.kernel.org" "pablo@netfilter.org" "pablo@netfilter.org"] recipients (cc): ["linux-kernel@vger.kernel.org"] crash: UBSAN: undefined-behaviour in nft_limit_init ================================================================================ UBSAN: Undefined behaviour in ./include/linux/math64.h:26:24 division by zero CPU: 1 PID: 10813 Comm: syz-executor.0 Not tainted 5.6.0-rc5-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+0x96/0xe0 lib/dump_stack.c:118 ubsan_epilogue+0x5/0x21 lib/ubsan.c:154 __ubsan_handle_divrem_overflow lib/ubsan.c:247 [inline] __ubsan_handle_divrem_overflow.cold.12+0x33/0x67 lib/ubsan.c:229 div_u64_rem include/linux/math64.h:26 [inline] div_u64 include/linux/math64.h:126 [inline] nft_limit_init.cold.2+0x68/0x94 net/netfilter/nft_limit.c:85 nf_tables_newexpr net/netfilter/nf_tables_api.c:2505 [inline] nft_expr_init+0x10e/0x280 net/netfilter/nf_tables_api.c:2543 nft_set_elem_expr_alloc+0x16/0x1e0 net/netfilter/nf_tables_api.c:4831 nf_tables_newset+0x12d3/0x2080 net/netfilter/nf_tables_api.c:4090 nfnetlink_rcv_batch+0x876/0x15e0 net/netfilter/nfnetlink.c:433 nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:543 [inline] nfnetlink_rcv+0x2bc/0x340 net/netfilter/nfnetlink.c:561 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x434/0x630 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x766/0xc10 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:672 ____sys_sendmsg+0x54e/0x760 net/socket.c:2343 ___sys_sendmsg+0xe4/0x160 net/socket.c:2397 __sys_sendmsg+0xce/0x170 net/socket.c:2430 do_syscall_64+0x98/0x560 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x466459 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f898dd31188 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000466459 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 00000000004bf9fb R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007ffee806955f R14: 00007f898dd31300 R15: 0000000000022000 ================================================================================ ================================================================================ UBSAN: Undefined behaviour in ./include/linux/math64.h:27:18 division by zero CPU: 0 PID: 10813 Comm: syz-executor.0 Not tainted 5.6.0-rc5-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+0x96/0xe0 lib/dump_stack.c:118 ubsan_epilogue+0x5/0x21 lib/ubsan.c:154 __ubsan_handle_divrem_overflow lib/ubsan.c:247 [inline] __ubsan_handle_divrem_overflow.cold.12+0x33/0x67 lib/ubsan.c:229 div_u64_rem include/linux/math64.h:27 [inline] div_u64 include/linux/math64.h:126 [inline] nft_limit_init.cold.2+0x7d/0x94 net/netfilter/nft_limit.c:85 nf_tables_newexpr net/netfilter/nf_tables_api.c:2505 [inline] nft_expr_init+0x10e/0x280 net/netfilter/nf_tables_api.c:2543 nft_set_elem_expr_alloc+0x16/0x1e0 net/netfilter/nf_tables_api.c:4831 nf_tables_newset+0x12d3/0x2080 net/netfilter/nf_tables_api.c:4090 nfnetlink_rcv_batch+0x876/0x15e0 net/netfilter/nfnetlink.c:433 nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:543 [inline] nfnetlink_rcv+0x2bc/0x340 net/netfilter/nfnetlink.c:561 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x434/0x630 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x766/0xc10 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:672 ____sys_sendmsg+0x54e/0x760 net/socket.c:2343 ___sys_sendmsg+0xe4/0x160 net/socket.c:2397 __sys_sendmsg+0xce/0x170 net/socket.c:2430 do_syscall_64+0x98/0x560 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x466459 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f898dd31188 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000466459 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 00000000004bf9fb R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007ffee806955f R14: 00007f898dd31300 R15: 0000000000022000 ================================================================================ divide error: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 10813 Comm: syz-executor.0 Not tainted 5.6.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:div_u64_rem include/linux/math64.h:27 [inline] RIP: 0010:div_u64 include/linux/math64.h:126 [inline] RIP: 0010:nft_limit_init+0x23d/0x570 net/netfilter/nft_limit.c:85 Code: 00 89 53 60 45 84 f6 0f 85 66 01 00 00 89 d2 4c 01 ea 0f 82 3f 02 00 00 48 0f af c2 45 89 ed 4d 85 ed 0f 84 2e 03 00 00 31 d2 <49> f7 f5 48 8d 7b 40 48 ba 00 00 00 00 00 fc ff df 48 89 f9 48 c1 RSP: 0018:ffffc9000a807150 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff8880b49eb908 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff89e08fc0 RDI: ffffffff8e517220 RBP: ffffc9000a807228 R08: ffffed10173c6479 R09: ffffed10173c6479 R10: ffffed10173c6478 R11: ffff8880b9e323c7 R12: 1ffff92001500e2c R13: 0000000000000000 R14: 0000000000000000 R15: ffff8880b49eb968 FS: 00007f898dd31700(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f829102e710 CR3: 000000009e878000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: nf_tables_newexpr net/netfilter/nf_tables_api.c:2505 [inline] nft_expr_init+0x10e/0x280 net/netfilter/nf_tables_api.c:2543 nft_set_elem_expr_alloc+0x16/0x1e0 net/netfilter/nf_tables_api.c:4831 nf_tables_newset+0x12d3/0x2080 net/netfilter/nf_tables_api.c:4090 nfnetlink_rcv_batch+0x876/0x15e0 net/netfilter/nfnetlink.c:433 nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:543 [inline] nfnetlink_rcv+0x2bc/0x340 net/netfilter/nfnetlink.c:561 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x434/0x630 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x766/0xc10 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:672 ____sys_sendmsg+0x54e/0x760 net/socket.c:2343 ___sys_sendmsg+0xe4/0x160 net/socket.c:2397 __sys_sendmsg+0xce/0x170 net/socket.c:2430 do_syscall_64+0x98/0x560 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x466459 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f898dd31188 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000466459 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 00000000004bf9fb R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007ffee806955f R14: 00007f898dd31300 R15: 0000000000022000 Modules linked in: ---[ end trace 3fb3977322e48354 ]--- RIP: 0010:div_u64_rem include/linux/math64.h:27 [inline] RIP: 0010:div_u64 include/linux/math64.h:126 [inline] RIP: 0010:nft_limit_init+0x23d/0x570 net/netfilter/nft_limit.c:85 Code: 00 89 53 60 45 84 f6 0f 85 66 01 00 00 89 d2 4c 01 ea 0f 82 3f 02 00 00 48 0f af c2 45 89 ed 4d 85 ed 0f 84 2e 03 00 00 31 d2 <49> f7 f5 48 8d 7b 40 48 ba 00 00 00 00 00 fc ff df 48 89 f9 48 c1 RSP: 0018:ffffc9000a807150 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff8880b49eb908 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff89e08fc0 RDI: ffffffff8e517220 RBP: ffffc9000a807228 R08: ffffed10173c6479 R09: ffffed10173c6479 R10: ffffed10173c6478 R11: ffff8880b9e323c7 R12: 1ffff92001500e2c R13: 0000000000000000 R14: 0000000000000000 R15: ffff8880b49eb968 FS: 00007f898dd31700(0000) GS:ffff8880b9f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fe366ad2000 CR3: 000000009e878000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400