general protection fault in em_cmp_match

15 views
Skip to first unread message

syzbot

unread,
Dec 14, 2022, 6:01:41 AM12/14/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=10daa000480000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=0f85f339d85a5e331ec1
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13269d2b880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1214f027880000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/98c0bdb4abb3/disk-3f8a27f9.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ea228ff02669/vmlinux-3f8a27f9.xz

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

kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 19 Comm: kworker/1:0 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Workqueue: ipv6_addrconf addrconf_dad_work
RIP: 0010:em_cmp_match+0x51/0x590 net/sched/em_cmp.c:29
Code: 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 f7 04 00 00 48 b8 00 00 00 00 00 fc ff df 48 8b 6b 08 48 8d 7d 0a 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 01 38 d0 7c 08 84 d2 0f 85 93
RSP: 0018:ffff8880b5ad6bc0 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffff8880a712ac80 RCX: ffffffff869f8a05
RDX: 0000000000000001 RSI: ffffffff869fa079 RDI: 000000000000000a
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000004 R11: 0000000000000000 R12: ffff8880ab454e00
R13: ffff8880a712ac80 R14: ffffffff8ae79960 R15: dffffc0000000000
FS: 0000000000000000(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f08c504b3b0 CR3: 0000000009e6d000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
tcf_em_match net/sched/ematch.c:496 [inline]
__tcf_em_tree_match+0x14a/0x530 net/sched/ematch.c:522
tcf_em_tree_match include/net/pkt_cls.h:531 [inline]
basic_classify+0x1c0/0x2b0 net/sched/cls_basic.c:49
tcf_classify+0x120/0x3c0 net/sched/cls_api.c:979
prio_classify net/sched/sch_prio.c:46 [inline]
prio_enqueue+0x3bb/0x7a0 net/sched/sch_prio.c:78
__dev_xmit_skb net/core/dev.c:3494 [inline]
__dev_queue_xmit+0x140a/0x2e00 net/core/dev.c:3807
neigh_hh_output include/net/neighbour.h:491 [inline]
neigh_output include/net/neighbour.h:499 [inline]
ip_finish_output2+0xb6d/0x15a0 net/ipv4/ip_output.c:230
ip_finish_output+0xae9/0x10b0 net/ipv4/ip_output.c:318
NF_HOOK_COND include/linux/netfilter.h:278 [inline]
ip_output+0x203/0x5f0 net/ipv4/ip_output.c:406
dst_output include/net/dst.h:455 [inline]
ip_local_out+0xaf/0x170 net/ipv4/ip_output.c:125
iptunnel_xmit+0x63b/0x9d0 net/ipv4/ip_tunnel_core.c:91
geneve_xmit_skb drivers/net/geneve.c:867 [inline]
geneve_xmit+0x120d/0x2e60 drivers/net/geneve.c:943
__netdev_start_xmit include/linux/netdevice.h:4349 [inline]
netdev_start_xmit include/linux/netdevice.h:4363 [inline]
xmit_one net/core/dev.c:3256 [inline]
dev_hard_start_xmit+0x1a8/0x920 net/core/dev.c:3272
__dev_queue_xmit+0x269d/0x2e00 net/core/dev.c:3838
neigh_resolve_output+0x55a/0x910 net/core/neighbour.c:1374
neigh_output include/net/neighbour.h:501 [inline]
ip6_finish_output2+0x113d/0x2290 net/ipv6/ip6_output.c:120
ip6_finish_output+0x89b/0x10f0 net/ipv6/ip6_output.c:192
NF_HOOK_COND include/linux/netfilter.h:278 [inline]
ip6_output+0x205/0x770 net/ipv6/ip6_output.c:209
dst_output include/net/dst.h:455 [inline]
NF_HOOK include/linux/netfilter.h:289 [inline]
ndisc_send_skb+0xa24/0x1720 net/ipv6/ndisc.c:491
ndisc_send_ns+0x51d/0x840 net/ipv6/ndisc.c:633
addrconf_dad_work+0xb0e/0x10a0 net/ipv6/addrconf.c:4076
process_one_work+0x864/0x1570 kernel/workqueue.c:2153
worker_thread+0x64c/0x1130 kernel/workqueue.c:2296
kthread+0x33f/0x460 kernel/kthread.c:259
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
Modules linked in:
---[ end trace 41d185f023e8efc0 ]---
RIP: 0010:em_cmp_match+0x51/0x590 net/sched/em_cmp.c:29
Code: 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 f7 04 00 00 48 b8 00 00 00 00 00 fc ff df 48 8b 6b 08 48 8d 7d 0a 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 01 38 d0 7c 08 84 d2 0f 85 93
RSP: 0018:ffff8880b5ad6bc0 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffff8880a712ac80 RCX: ffffffff869f8a05
RDX: 0000000000000001 RSI: ffffffff869fa079 RDI: 000000000000000a
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000004 R11: 0000000000000000 R12: ffff8880ab454e00
R13: ffff8880a712ac80 R14: ffffffff8ae79960 R15: dffffc0000000000
FS: 0000000000000000(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f08c504b3b0 CR3: 0000000009e6d000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 48 89 fa mov %rdi,%rdx
3: 48 c1 ea 03 shr $0x3,%rdx
7: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1)
b: 0f 85 f7 04 00 00 jne 0x508
11: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
18: fc ff df
1b: 48 8b 6b 08 mov 0x8(%rbx),%rbp
1f: 48 8d 7d 0a lea 0xa(%rbp),%rdi
23: 48 89 fa mov %rdi,%rdx
26: 48 c1 ea 03 shr $0x3,%rdx
* 2a: 0f b6 14 02 movzbl (%rdx,%rax,1),%edx <-- trapping instruction
2e: 48 89 f8 mov %rdi,%rax
31: 83 e0 07 and $0x7,%eax
34: 83 c0 01 add $0x1,%eax
37: 38 d0 cmp %dl,%al
39: 7c 08 jl 0x43
3b: 84 d2 test %dl,%dl
3d: 0f .byte 0xf
3e: 85 .byte 0x85
3f: 93 xchg %eax,%ebx


---
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 can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Dec 19, 2022, 2:43:39 AM12/19/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c4215ee4771b Linux 4.14.302
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=118daed7880000
kernel config: https://syzkaller.appspot.com/x/.config?x=4a9988fe055c9527
dashboard link: https://syzkaller.appspot.com/bug?extid=0d44fe152dedbafa4bc9
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12129127880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=140cb79d880000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/c93ba055d204/disk-c4215ee4.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/bfbc929a33c1/vmlinux-c4215ee4.xz
kernel image: https://storage.googleapis.com/syzbot-assets/444658051770/bzImage-c4215ee4.xz

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

kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 23 Comm: kworker/1:1 Not tainted 4.14.302-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Workqueue: ipv6_addrconf addrconf_dad_work
task: ffff8880b5600600 task.stack: ffff8880b5608000
RIP: 0010:em_cmp_match+0x4d/0x4f0 net/sched/em_cmp.c:29
RSP: 0018:ffff8880b560edf8 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000001 RSI: ffff8880a996aec0 RDI: 000000000000000a
RBP: 0000000000000001 R08: ffffffff8ba64cac R09: 0000000000001da8
R10: 0000000000000001 R11: ffff8880b5600600 R12: ffff8880b4bb4400
R13: ffff8880a996aec0 R14: ffffffff89d1c860 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff8880ba500000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f48ebadf3a0 CR3: 0000000008e6a000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
tcf_em_match net/sched/ematch.c:496 [inline]
__tcf_em_tree_match+0x131/0x460 net/sched/ematch.c:522
tcf_em_tree_match include/net/pkt_cls.h:367 [inline]
basic_classify+0x193/0x280 net/sched/cls_basic.c:51
tcf_classify+0xfd/0x300 net/sched/cls_api.c:337
prio_classify net/sched/sch_prio.c:46 [inline]
prio_enqueue+0x30c/0x670 net/sched/sch_prio.c:77
__dev_xmit_skb net/core/dev.c:3225 [inline]
__dev_queue_xmit+0x121d/0x2480 net/core/dev.c:3489
neigh_hh_output include/net/neighbour.h:490 [inline]
neigh_output include/net/neighbour.h:498 [inline]
ip_finish_output2+0x9db/0x1340 net/ipv4/ip_output.c:237
ip_finish_output+0x37c/0xc50 net/ipv4/ip_output.c:325
NF_HOOK_COND include/linux/netfilter.h:239 [inline]
ip_output+0x1cd/0x510 net/ipv4/ip_output.c:413
dst_output include/net/dst.h:470 [inline]
ip_local_out+0x93/0x170 net/ipv4/ip_output.c:125
iptunnel_xmit+0x5cc/0x950 net/ipv4/ip_tunnel_core.c:91
geneve_xmit_skb drivers/net/geneve.c:866 [inline]
geneve_xmit+0xf15/0x2ca0 drivers/net/geneve.c:947
__netdev_start_xmit include/linux/netdevice.h:4054 [inline]
netdev_start_xmit include/linux/netdevice.h:4063 [inline]
xmit_one net/core/dev.c:3005 [inline]
dev_hard_start_xmit+0x188/0x890 net/core/dev.c:3021
__dev_queue_xmit+0x1d7f/0x2480 net/core/dev.c:3521
neigh_resolve_output+0x4e5/0x870 net/core/neighbour.c:1384
neigh_output include/net/neighbour.h:500 [inline]
ip6_finish_output2+0xf48/0x1f10 net/ipv6/ip6_output.c:120
ip6_finish_output+0x5c6/0xd50 net/ipv6/ip6_output.c:192
NF_HOOK_COND include/linux/netfilter.h:239 [inline]
ip6_output+0x1c5/0x660 net/ipv6/ip6_output.c:209
dst_output include/net/dst.h:470 [inline]
NF_HOOK include/linux/netfilter.h:250 [inline]
ndisc_send_skb+0x82a/0x1390 net/ipv6/ndisc.c:483
ndisc_send_ns+0x4ca/0x7c0 net/ipv6/ndisc.c:625
addrconf_dad_work+0x96f/0xef0 net/ipv6/addrconf.c:4012
process_one_work+0x793/0x14a0 kernel/workqueue.c:2117
worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251
kthread+0x30d/0x420 kernel/kthread.c:232
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:406
Code: df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 4c 04 00 00 48 b8 00 00 00 00 00 fc ff df 48 8b 5b 08 48 8d 7b 0a 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 01 38 d0 7c 08 84 d2 0f 85
RIP: em_cmp_match+0x4d/0x4f0 net/sched/em_cmp.c:29 RSP: ffff8880b560edf8
---[ end trace d7341b3d0a69401a ]---
----------------
Code disassembly (best guess):
0: df 48 89 fisttps -0x77(%rax)
3: fa cli
4: 48 c1 ea 03 shr $0x3,%rdx
8: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1)
c: 0f 85 4c 04 00 00 jne 0x45e
12: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
19: fc ff df
1c: 48 8b 5b 08 mov 0x8(%rbx),%rbx
20: 48 8d 7b 0a lea 0xa(%rbx),%rdi
24: 48 89 fa mov %rdi,%rdx
27: 48 c1 ea 03 shr $0x3,%rdx
* 2b: 0f b6 14 02 movzbl (%rdx,%rax,1),%edx <-- trapping instruction
2f: 48 89 f8 mov %rdi,%rax
32: 83 e0 07 and $0x7,%eax
35: 83 c0 01 add $0x1,%eax
38: 38 d0 cmp %dl,%al
3a: 7c 08 jl 0x44
3c: 84 d2 test %dl,%dl
3e: 0f .byte 0xf
3f: 85 .byte 0x85

syzbot

unread,
Apr 18, 2023, 4:47:48 AM4/18/23
to jone...@google.com, syzkaller-a...@googlegroups.com, syzkaller...@googlegroups.com, tudor....@linaro.org
This bug is marked as fixed by commit:
net_sched: reject TCF_EM_SIMPLE case for complex ematch module

But I can't find it in the tested trees[1] for more than 90 days.
Is it a correct commit? Please update it by replying:

#syz fix: exact-commit-title

Until then the bug is still considered open and new crashes with
the same signature are ignored.

Kernel: Linux 4.19
Dashboard link: https://syzkaller.appspot.com/bug?extid=0f85f339d85a5e331ec1

---
[1] I expect the commit to be present in:

1. linux-4.19.y branch of
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git

Tudor Ambarus

unread,
Apr 18, 2023, 6:29:32 AM4/18/23
to syzbot, jone...@google.com, syzkaller-a...@googlegroups.com, syzkaller...@googlegroups.com, Aleksandr Nogikh
+ Aleksandr
But the patch is present in that branch:
stable/linux-4.19.y:
134b529db48a7 net_sched: reject TCF_EM_SIMPLE case for complex ematch module

Aleksandr?

Aleksandr Nogikh

unread,
Apr 20, 2023, 7:12:30 AM4/20/23
to Tudor Ambarus, syzbot, jone...@google.com, syzkaller-a...@googlegroups.com, syzkaller...@googlegroups.com
Thanks for reporting!
We stopped fuzzing Android 4.19, but forgot about these notifications.
Now the namespace is properly decommissioned, so there should be no
such messages.

--
Aleksandr

Aleksandr Nogikh

unread,
Apr 20, 2023, 7:12:44 AM4/20/23
to Tudor Ambarus, syzbot, jone...@google.com, syzkaller-a...@googlegroups.com, syzkaller...@googlegroups.com
On Thu, Apr 20, 2023 at 1:12 PM Aleksandr Nogikh <nog...@google.com> wrote:
>
> Thanks for reporting!
> We stopped fuzzing Android 4.19, but forgot about these notifications.
^^ Linux 4.19
Reply all
Reply to author
Forward
0 new messages