kernel BUG in pfkey_send_acquire

12 views
Skip to first unread message

syzbot

unread,
Jan 17, 2021, 10:22:18 AM1/17/21
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c110fed0 Linux 4.19.168
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1576749f500000
kernel config: https://syzkaller.appspot.com/x/.config?x=ab04f4c73d0ab4a8
dashboard link: https://syzkaller.appspot.com/bug?extid=f02b5dfb3cde2b2c8e57
compiler: gcc (GCC) 10.1.0-syz 20200507

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+f02b5d...@syzkaller.appspotmail.com

skbuff: skb_over_panic: text:000000005b238e57 len:736 put:72 head:00000000caf28d63 data:00000000caf28d63 tail:0x2e0 end:0x2c0 dev:<NULL>
------------[ cut here ]------------
kernel BUG at net/core/skbuff.c:104!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 27136 Comm: syz-executor.0 Not tainted 4.19.168-syzkaller #0
netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'.
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:skb_panic+0x172/0x174 net/core/skbuff.c:104
Code: 4c 24 10 8b 8b 80 00 00 00 41 56 45 89 e8 4c 89 e2 41 57 48 89 ee 48 c7 c7 60 d3 4b 89 ff 74 24 10 ff 74 24 20 e8 5d 21 e2 ff <0f> 0b e8 d8 fb 53 f9 4c 8b 64 24 18 e8 1e 98 89 f9 48 c7 c1 c0 dc
RSP: 0018:ffff88806819efa8 EFLAGS: 00010286
netlink: 6 bytes leftover after parsing attributes in process `syz-executor.5'.
RAX: 0000000000000088 RBX: ffff8880a4b0da00 RCX: 0000000000000000
RDX: 0000000000040000 RSI: ffffffff814de1b1 RDI: ffffed100d033de7
RBP: ffffffff894bdd00 R08: 0000000000000088 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: ffffffff872070e3
R13: 0000000000000048 R14: ffffffff894bd320 R15: 00000000000002c0
FS: 00007f5ce8c78700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b3332d000 CR3: 00000000920f3000 CR4: 00000000001426f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
skb_over_panic net/core/skbuff.c:109 [inline]
skb_put.cold+0x24/0x24 net/core/skbuff.c:1702
dump_esp_combs net/key/af_key.c:3012 [inline]
pfkey_send_acquire+0x1853/0x2520 net/key/af_key.c:3233
km_query+0xc5/0x210 net/xfrm/xfrm_state.c:2024
xfrm_state_find+0x1c6c/0x2cb0 net/xfrm/xfrm_state.c:1043
xfrm_tmpl_resolve_one net/xfrm/xfrm_policy.c:1410 [inline]
xfrm_tmpl_resolve+0x2f3/0xc20 net/xfrm/xfrm_policy.c:1455
netlink: 6 bytes leftover after parsing attributes in process `syz-executor.5'.
xfrm_resolve_and_create_bundle+0xd8/0x3e0 net/xfrm/xfrm_policy.c:1753
xfrm_lookup_with_ifid+0x243/0x1cb0 net/xfrm/xfrm_policy.c:2076
xfrm_lookup net/xfrm/xfrm_policy.c:2200 [inline]
xfrm_lookup_route+0x36/0x1e0 net/xfrm/xfrm_policy.c:2211
ip_route_output_flow+0x114/0x150 net/ipv4/route.c:2639
udp_sendmsg+0x19ce/0x2550 net/ipv4/udp.c:1101
inet_sendmsg+0x132/0x5a0 net/ipv4/af_inet.c:798
sock_sendmsg_nosec net/socket.c:622 [inline]
sock_sendmsg+0xc3/0x120 net/socket.c:632
___sys_sendmsg+0x3b3/0x8e0 net/socket.c:2115
__sys_sendmmsg+0x195/0x470 net/socket.c:2210
__do_sys_sendmmsg net/socket.c:2239 [inline]
__se_sys_sendmmsg net/socket.c:2236 [inline]
__x64_sys_sendmmsg+0x99/0x100 net/socket.c:2236
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45e219
Code: 0d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f5ce8c77c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 000000000045e219
RDX: 000000000800001d RSI: 0000000020007fc0 RDI: 0000000000000003
RBP: 000000000119c070 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000119c034
R13: 00007ffde0e16c8f R14: 00007f5ce8c789c0 R15: 000000000119c034
Modules linked in:
---[ end trace 4fc9bede48dd1126 ]---
RIP: 0010:skb_panic+0x172/0x174 net/core/skbuff.c:104
Code: 4c 24 10 8b 8b 80 00 00 00 41 56 45 89 e8 4c 89 e2 41 57 48 89 ee 48 c7 c7 60 d3 4b 89 ff 74 24 10 ff 74 24 20 e8 5d 21 e2 ff <0f> 0b e8 d8 fb 53 f9 4c 8b 64 24 18 e8 1e 98 89 f9 48 c7 c1 c0 dc
RSP: 0018:ffff88806819efa8 EFLAGS: 00010286
RAX: 0000000000000088 RBX: ffff8880a4b0da00 RCX: 0000000000000000
RDX: 0000000000040000 RSI: ffffffff814de1b1 RDI: ffffed100d033de7
RBP: ffffffff894bdd00 R08: 0000000000000088 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: ffffffff872070e3
R13: 0000000000000048 R14: ffffffff894bd320 R15: 00000000000002c0
FS: 00007f5ce8c78700(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f3c6c804000 CR3: 00000000920f3000 CR4: 00000000001426e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Jan 19, 2021, 9:48:24 PM1/19/21
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 43d555d8 Linux 4.19.169
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1780b01b500000
kernel config: https://syzkaller.appspot.com/x/.config?x=2c45e5cf79a63e8f
dashboard link: https://syzkaller.appspot.com/bug?extid=f02b5dfb3cde2b2c8e57
compiler: gcc (GCC) 10.1.0-syz 20200507
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=129e6334d00000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+f02b5d...@syzkaller.appspotmail.com

wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50
IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
skbuff: skb_over_panic: text:0000000053a3e97c len:232 put:72 head:00000000b73e8227 data:00000000b73e8227 tail:0xe8 end:0xc0 dev:<NULL>
------------[ cut here ]------------
kernel BUG at net/core/skbuff.c:104!
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 9540 Comm: syz-executor.5 Not tainted 4.19.169-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:skb_panic+0x172/0x174 net/core/skbuff.c:104
Code: 4c 24 10 8b 8b 80 00 00 00 41 56 45 89 e8 4c 89 e2 41 57 48 89 ee 48 c7 c7 60 d3 4b 89 ff 74 24 10 ff 74 24 20 e8 3d 22 e2 ff <0f> 0b e8 68 ec 53 f9 4c 8b 64 24 18 e8 ae 88 89 f9 48 c7 c1 c0 dc
RSP: 0018:ffff88809039efa8 EFLAGS: 00010286
RAX: 0000000000000086 RBX: ffff88809da653c0 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff814de1b1 RDI: ffffed1012073de7
RBP: ffffffff894bdd00 R08: 0000000000000086 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: ffffffff872085dd
R13: 0000000000000048 R14: ffffffff894bd320 R15: 00000000000000c0
FS: 00007f16dfef6700(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f747457c000 CR3: 000000009df2d000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
skb_over_panic net/core/skbuff.c:109 [inline]
skb_put.cold+0x24/0x24 net/core/skbuff.c:1702
skb_put_zero include/linux/skbuff.h:2113 [inline]
dump_ah_combs net/key/af_key.c:2968 [inline]
pfkey_send_acquire+0x1cfd/0x2520 net/key/af_key.c:3231
km_query+0xc5/0x210 net/xfrm/xfrm_state.c:2024
xfrm_state_find+0x1c6c/0x2cb0 net/xfrm/xfrm_state.c:1043
xfrm_tmpl_resolve_one net/xfrm/xfrm_policy.c:1410 [inline]
xfrm_tmpl_resolve+0x2f3/0xc20 net/xfrm/xfrm_policy.c:1455
xfrm_resolve_and_create_bundle+0xd8/0x3e0 net/xfrm/xfrm_policy.c:1753
xfrm_lookup_with_ifid+0x243/0x1cb0 net/xfrm/xfrm_policy.c:2076
xfrm_lookup net/xfrm/xfrm_policy.c:2200 [inline]
xfrm_lookup_route+0x36/0x1e0 net/xfrm/xfrm_policy.c:2211
ip_route_output_flow+0x114/0x150 net/ipv4/route.c:2639
udp_sendmsg+0x19ce/0x2550 net/ipv4/udp.c:1101
inet_sendmsg+0x132/0x5a0 net/ipv4/af_inet.c:798
sock_sendmsg_nosec net/socket.c:622 [inline]
sock_sendmsg+0xc3/0x120 net/socket.c:632
___sys_sendmsg+0x3b3/0x8e0 net/socket.c:2115
__sys_sendmmsg+0x195/0x470 net/socket.c:2210
__do_sys_sendmmsg net/socket.c:2239 [inline]
__se_sys_sendmmsg net/socket.c:2236 [inline]
__x64_sys_sendmmsg+0x99/0x100 net/socket.c:2236
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45e219
Code: 0d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f16dfef5c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 000000000045e219
RDX: 000000000800001d RSI: 0000000020007fc0 RDI: 0000000000000003
RBP: 000000000119c070 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000119c034
R13: 00007ffd6e1bca6f R14: 00007f16dfef69c0 R15: 000000000119c034
Modules linked in:
---[ end trace 8435b83f921ee49e ]---
RIP: 0010:skb_panic+0x172/0x174 net/core/skbuff.c:104
Code: 4c 24 10 8b 8b 80 00 00 00 41 56 45 89 e8 4c 89 e2 41 57 48 89 ee 48 c7 c7 60 d3 4b 89 ff 74 24 10 ff 74 24 20 e8 3d 22 e2 ff <0f> 0b e8 68 ec 53 f9 4c 8b 64 24 18 e8 ae 88 89 f9 48 c7 c1 c0 dc
RSP: 0018:ffff88809039efa8 EFLAGS: 00010286
RAX: 0000000000000086 RBX: ffff88809da653c0 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff814de1b1 RDI: ffffed1012073de7
RBP: ffffffff894bdd00 R08: 0000000000000086 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: ffffffff872085dd
R13: 0000000000000048 R14: ffffffff894bd320 R15: 00000000000000c0
FS: 00007f16dfef6700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f0b4c489008 CR3: 000000009df2d000 CR4: 00000000001406f0

syzbot

unread,
Jan 20, 2021, 12:15:25 AM1/20/21
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 43d555d8 Linux 4.19.169
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=16f967e7500000
kernel config: https://syzkaller.appspot.com/x/.config?x=2c45e5cf79a63e8f
dashboard link: https://syzkaller.appspot.com/bug?extid=f02b5dfb3cde2b2c8e57
compiler: gcc (GCC) 10.1.0-syz 20200507
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1492d334d00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11233d34d00000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+f02b5d...@syzkaller.appspotmail.com

IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready
skbuff: skb_over_panic: text:00000000cf1c7276 len:232 put:72 head:00000000963f6d6a data:00000000963f6d6a tail:0xe8 end:0xc0 dev:<NULL>
------------[ cut here ]------------
kernel BUG at net/core/skbuff.c:104!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 9462 Comm: syz-executor847 Not tainted 4.19.169-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:skb_panic+0x172/0x174 net/core/skbuff.c:104
Code: 4c 24 10 8b 8b 80 00 00 00 41 56 45 89 e8 4c 89 e2 41 57 48 89 ee 48 c7 c7 60 d3 4b 89 ff 74 24 10 ff 74 24 20 e8 3d 22 e2 ff <0f> 0b e8 68 ec 53 f9 4c 8b 64 24 18 e8 ae 88 89 f9 48 c7 c1 c0 dc
RSP: 0018:ffff88809ed7efa8 EFLAGS: 00010286
RAX: 0000000000000086 RBX: ffff8880a15962c0 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff814de1b1 RDI: ffffed1013dafde7
RBP: ffffffff894bdd00 R08: 0000000000000086 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: ffffffff87208133
R13: 0000000000000048 R14: ffffffff894bd320 R15: 00000000000000c0
FS: 00007f5c9219d700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1e965505e0 CR3: 000000009efec000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
skb_over_panic net/core/skbuff.c:109 [inline]
skb_put.cold+0x24/0x24 net/core/skbuff.c:1702
dump_esp_combs net/key/af_key.c:3012 [inline]
pfkey_send_acquire+0x1853/0x2520 net/key/af_key.c:3233
km_query+0xc5/0x210 net/xfrm/xfrm_state.c:2024
xfrm_state_find+0x1c6c/0x2cb0 net/xfrm/xfrm_state.c:1043
xfrm_tmpl_resolve_one net/xfrm/xfrm_policy.c:1410 [inline]
xfrm_tmpl_resolve+0x2f3/0xc20 net/xfrm/xfrm_policy.c:1455
xfrm_resolve_and_create_bundle+0xd8/0x3e0 net/xfrm/xfrm_policy.c:1753
xfrm_lookup_with_ifid+0x243/0x1cb0 net/xfrm/xfrm_policy.c:2076
xfrm_lookup net/xfrm/xfrm_policy.c:2200 [inline]
xfrm_lookup_route+0x36/0x1e0 net/xfrm/xfrm_policy.c:2211
ip_route_output_flow+0x114/0x150 net/ipv4/route.c:2639
udp_sendmsg+0x19ce/0x2550 net/ipv4/udp.c:1101
inet_sendmsg+0x132/0x5a0 net/ipv4/af_inet.c:798
sock_sendmsg_nosec net/socket.c:622 [inline]
sock_sendmsg+0xc3/0x120 net/socket.c:632
___sys_sendmsg+0x3b3/0x8e0 net/socket.c:2115
__sys_sendmmsg+0x195/0x470 net/socket.c:2210
__do_sys_sendmmsg net/socket.c:2239 [inline]
__se_sys_sendmmsg net/socket.c:2236 [inline]
__x64_sys_sendmmsg+0x99/0x100 net/socket.c:2236
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x44e2b9
Code: e8 1c e6 ff ff 48 83 c4 18 c3 0f 1f 80 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 0f 83 eb f7 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f5c9219cd98 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00000000006eaa18 RCX: 000000000044e2b9
RDX: 000000000800001d RSI: 0000000020007fc0 RDI: 0000000000000003
RBP: 00000000006eaa10 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006eaa1c
R13: 0021ba6600000089 R14: a7460fc1010f0000 R15: 0051b900000005b8
Modules linked in:
---[ end trace f6440b02eafcb1cc ]---
RIP: 0010:skb_panic+0x172/0x174 net/core/skbuff.c:104
Code: 4c 24 10 8b 8b 80 00 00 00 41 56 45 89 e8 4c 89 e2 41 57 48 89 ee 48 c7 c7 60 d3 4b 89 ff 74 24 10 ff 74 24 20 e8 3d 22 e2 ff <0f> 0b e8 68 ec 53 f9 4c 8b 64 24 18 e8 ae 88 89 f9 48 c7 c1 c0 dc
RSP: 0018:ffff88809ed7efa8 EFLAGS: 00010286
RAX: 0000000000000086 RBX: ffff8880a15962c0 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff814de1b1 RDI: ffffed1013dafde7
RBP: ffffffff894bdd00 R08: 0000000000000086 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: ffffffff87208133
R13: 0000000000000048 R14: ffffffff894bd320 R15: 00000000000000c0
FS: 00007f5c9219d700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fd26b1f5000 CR3: 000000009efec000 CR4: 00000000001406f0

syzbot

unread,
Mar 17, 2021, 8:28:05 PM3/17/21
to syzkaller...@googlegroups.com
syzbot suspects this issue was fixed by commit:

commit fa137b50f3264a157575413030464c19ab553b0e
Author: Ming Lei <ming...@redhat.com>
Date: Tue Aug 27 11:01:48 2019 +0000

block: split .sysfs_lock into two locks

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1292d1b2d00000
start commit: 811218ec Linux 4.19.172
git tree: linux-4.19.y
kernel config: https://syzkaller.appspot.com/x/.config?x=c1cb1d27398c8808
dashboard link: https://syzkaller.appspot.com/bug?extid=f02b5dfb3cde2b2c8e57
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17e8d0f8d00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=177c968cd00000

If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: block: split .sysfs_lock into two locks

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages