WARNING in kmalloc_slab (4)

12 views
Skip to first unread message

syzbot

unread,
Mar 13, 2018, 3:33:04 AM3/13/18
to da...@davemloft.net, her...@gondor.apana.org.au, linux-...@vger.kernel.org, net...@vger.kernel.org, steffen....@secunet.com, syzkall...@googlegroups.com
Hello,

syzbot hit the following crash on net-next commit
f44b1886a5f876c87b5889df463ad7b97834ba37 (Fri Mar 9 18:10:06 2018 +0000)
Merge branch 's390-qeth-next'

Unfortunately, I don't have any reproducer for this crash yet.
Raw console output is attached.
compiler: gcc (GCC) 7.1.1 20170620
.config is attached.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+6a7e7e...@syzkaller.appspotmail.com
It will help syzbot understand when the bug is fixed. See footer for
details.
If you forward the report, please keep this part and the footer.

WARNING: CPU: 1 PID: 27333 at mm/slab_common.c:1012 kmalloc_slab+0x5d/0x70
mm/slab_common.c:1012
Kernel panic - not syncing: panic_on_warn set ...

syz-executor0: vmalloc: allocation failure: 17045651456 bytes,
mode:0x14080c0(GFP_KERNEL|__GFP_ZERO), nodemask=(null)
CPU: 1 PID: 27333 Comm: syz-executor2 Not tainted 4.16.0-rc4+ #260
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+0x194/0x24d lib/dump_stack.c:53
panic+0x1e4/0x41c kernel/panic.c:183
syz-executor0 cpuset=
__warn+0x1dc/0x200 kernel/panic.c:547
/
mems_allowed=0
report_bug+0x211/0x2d0 lib/bug.c:184
fixup_bug.part.11+0x37/0x80 arch/x86/kernel/traps.c:178
fixup_bug arch/x86/kernel/traps.c:247 [inline]
do_error_trap+0x2d7/0x3e0 arch/x86/kernel/traps.c:296
do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:315
invalid_op+0x1b/0x40 arch/x86/entry/entry_64.S:986
RIP: 0010:kmalloc_slab+0x5d/0x70 mm/slab_common.c:1012
RSP: 0018:ffff8801ccfc72f0 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000010000018 RCX: ffffffff84ec4fc8
RDX: 0000000000000ba7 RSI: 0000000000000000 RDI: 0000000010000018
RBP: ffff8801ccfc72f0 R08: 0000000000000000 R09: 1ffff100399f8e21
R10: ffff8801ccfc7040 R11: 0000000000000001 R12: 0000000000000018
R13: ffff8801ccfc7598 R14: 00000000014080c0 R15: ffff8801aebaad80
__do_kmalloc mm/slab.c:3700 [inline]
__kmalloc+0x25/0x760 mm/slab.c:3714
kmalloc include/linux/slab.h:517 [inline]
kzalloc include/linux/slab.h:701 [inline]
xfrm_alloc_replay_state_esn net/xfrm/xfrm_user.c:442 [inline]
xfrm_state_construct net/xfrm/xfrm_user.c:601 [inline]
xfrm_add_sa+0x1b15/0x3440 net/xfrm/xfrm_user.c:647
xfrm_user_rcv_msg+0x41c/0x860 net/xfrm/xfrm_user.c:2595
netlink_rcv_skb+0x14b/0x380 net/netlink/af_netlink.c:2444
xfrm_netlink_rcv+0x6f/0x90 net/xfrm/xfrm_user.c:2603
netlink_unicast_kernel net/netlink/af_netlink.c:1308 [inline]
netlink_unicast+0x4c4/0x6b0 net/netlink/af_netlink.c:1334
netlink_sendmsg+0xa4a/0xe60 net/netlink/af_netlink.c:1897
sock_sendmsg_nosec net/socket.c:629 [inline]
sock_sendmsg+0xca/0x110 net/socket.c:639
___sys_sendmsg+0x767/0x8b0 net/socket.c:2047
__sys_sendmsg+0xe5/0x210 net/socket.c:2081
SYSC_sendmsg net/socket.c:2092 [inline]
SyS_sendmsg+0x2d/0x50 net/socket.c:2088
do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x453e69
RSP: 002b:00007f1cbcfbfc68 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f1cbcfc06d4 RCX: 0000000000453e69
RDX: 0000000000000000 RSI: 000000002014f000 RDI: 0000000000000013
RBP: 000000000072bea0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 00000000000004c7 R14: 00000000006f7348 R15: 0000000000000000
CPU: 0 PID: 27337 Comm: syz-executor0 Not tainted 4.16.0-rc4+ #260
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+0x194/0x24d lib/dump_stack.c:53
warn_alloc+0x19a/0x2b0 mm/page_alloc.c:3310
__vmalloc_node_range+0x4f0/0x650 mm/vmalloc.c:1775
__vmalloc_node mm/vmalloc.c:1804 [inline]
__vmalloc_node_flags_caller+0x50/0x60 mm/vmalloc.c:1826
kvmalloc_node+0x82/0xd0 mm/util.c:428
kvmalloc include/linux/mm.h:541 [inline]
kvmalloc_array include/linux/mm.h:557 [inline]
xt_alloc_entry_offsets+0x21/0x30 net/netfilter/x_tables.c:778
translate_table+0x235/0x1690 net/ipv6/netfilter/ip6_tables.c:703
do_replace net/ipv6/netfilter/ip6_tables.c:1164 [inline]
do_ip6t_set_ctl+0x370/0x5f0 net/ipv6/netfilter/ip6_tables.c:1690
nf_sockopt net/netfilter/nf_sockopt.c:106 [inline]
nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:115
ipv6_setsockopt+0x10b/0x130 net/ipv6/ipv6_sockglue.c:927
tcp_setsockopt+0x82/0xd0 net/ipv4/tcp.c:2878
sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2980
SYSC_setsockopt net/socket.c:1850 [inline]
SyS_setsockopt+0x189/0x360 net/socket.c:1829
do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x453e69
RSP: 002b:00007f2fec3b0c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00007f2fec3b16d4 RCX: 0000000000453e69
RDX: 0000000000000040 RSI: 0000000000000029 RDI: 0000000000000014
RBP: 000000000072bea0 R08: 0000000000000004 R09: 0000000000000000
R10: 0000000020001fde R11: 0000000000000246 R12: 00000000ffffffff
R13: 0000000000000520 R14: 00000000006f7ba0 R15: 0000000000000000
Dumping ftrace buffer:
(ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..


---
This bug is generated by a dumb bot. It may contain errors.
See https://goo.gl/tpsmEJ for details.
Direct all questions to syzk...@googlegroups.com.

syzbot will keep track of this bug report.
If you forgot to add the Reported-by tag, once the fix for this bug is
merged
into any tree, please reply to this email with:
#syz fix: exact-commit-title
To mark this as a duplicate of another syzbot report, please reply with:
#syz dup: exact-subject-of-another-report
If it's a one-off invalid bug report, please reply with:
#syz invalid
Note: if the crash happens again, it will cause creation of a new bug
report.
Note: all commands must start from beginning of the line in the email body.
raw.log.txt
config.txt

Steffen Klassert

unread,
Mar 13, 2018, 3:51:45 AM3/13/18
to syzbot, da...@davemloft.net, her...@gondor.apana.org.au, linux-...@vger.kernel.org, net...@vger.kernel.org, syzkall...@googlegroups.com
This is likely fixed with:

commit d97ca5d714a5334aecadadf696875da40f1fbf3e
xfrm_user: uncoditionally validate esn replay attribute struct

The patch is included in the ipsec pull request for the net
tree I've sent this morning.

Dmitry Vyukov

unread,
Mar 13, 2018, 4:04:40 AM3/13/18
to Steffen Klassert, syzbot, David Miller, Herbert Xu, LKML, netdev, syzkall...@googlegroups.com
Let's tell syzbot:

#syz fix: xfrm_user: uncoditionally validate esn replay attribute struct
Reply all
Reply to author
Forward
0 new messages