* [syzbot] [bpf?] WARNING in convert_ctx_accesses
@ 2025-07-31 3:19 syzbot
2025-07-31 13:43 ` syzbot
0 siblings, 1 reply; 3+ messages in thread
From: syzbot @ 2025-07-31 3:19 UTC (permalink / raw)
To: andrii, ast, bpf, daniel, eddyz87, haoluo, john.fastabend, jolsa,
kpsingh, linux-kernel, martin.lau, sdf, song, syzkaller-bugs,
yonghong.song
Hello,
syzbot found the following issue on:
HEAD commit: e8d780dcd957 Merge tag 'slab-for-6.17' of git://git.kernel..
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=151049bc580000
kernel config: https://syzkaller.appspot.com/x/.config?x=d32de89be62206c8
dashboard link: https://syzkaller.appspot.com/bug?extid=ccac90e482b2a81d74aa
compiler: gcc (Debian 12.2.0-14+deb12u1) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=131049bc580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11cc2cf0580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/c62f8561b026/disk-e8d780dc.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/abb3e0f20140/vmlinux-e8d780dc.xz
kernel image: https://storage.googleapis.com/syzbot-assets/117094d1e482/bzImage-e8d780dc.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+ccac90e482b2a81d74aa@syzkaller.appspotmail.com
------------[ cut here ]------------
verifier bug: error during ctx access conversion(1)
WARNING: CPU: 0 PID: 5822 at kernel/bpf/verifier.c:21448 convert_ctx_accesses+0x2045/0x2920 kernel/bpf/verifier.c:21448
Modules linked in:
CPU: 0 UID: 0 PID: 5822 Comm: syz-executor130 Not tainted 6.16.0-syzkaller-06699-ge8d780dcd957 #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
RIP: 0010:convert_ctx_accesses+0x2045/0x2920 kernel/bpf/verifier.c:21448
Code: c7 c6 a0 95 b5 8b e8 ea a5 07 00 e9 a4 f9 ff ff e8 50 6c e8 ff c6 05 16 03 bd 0e 01 90 48 c7 c7 00 96 b5 8b e8 6c 02 a7 ff 90 <0f> 0b 90 90 e9 f1 fe ff ff e8 2d 6c e8 ff 0f b6 1d f6 02 bd 0e 31
RSP: 0018:ffffc90003dcf6e8 EFLAGS: 00010282
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff817a3658
RDX: ffff8880775dc880 RSI: ffffffff817a3665 RDI: 0000000000000001
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000001 R12: dffffc0000000000
R13: ffffc90000ace048 R14: 0000000000000004 R15: ffff888023798000
FS: 0000555582c6c380(0000) GS:ffff88812471e000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000561e04e07000 CR3: 0000000071c4c000 CR4: 00000000003526f0
Call Trace:
<TASK>
bpf_check+0x5960/0xc600 kernel/bpf/verifier.c:24736
bpf_prog_load+0xe41/0x2490 kernel/bpf/syscall.c:2972
__sys_bpf+0x4a3f/0x4de0 kernel/bpf/syscall.c:6022
__do_sys_bpf kernel/bpf/syscall.c:6132 [inline]
__se_sys_bpf kernel/bpf/syscall.c:6130 [inline]
__x64_sys_bpf+0x78/0xc0 kernel/bpf/syscall.c:6130
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f75a63f53a9
Code: 48 83 c4 28 c3 e8 37 17 00 00 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffeb40793f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007ffeb40795d8 RCX: 00007f75a63f53a9
RDX: 0000000000000048 RSI: 00002000000054c0 RDI: 0000000000000005
RBP: 00007f75a6468610 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffffffffffff R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffeb40795c8 R14: 0000000000000001 R15: 0000000000000001
</TASK>
---
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 syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [syzbot] [bpf?] WARNING in convert_ctx_accesses
2025-07-31 3:19 [syzbot] [bpf?] WARNING in convert_ctx_accesses syzbot
@ 2025-07-31 13:43 ` syzbot
2025-07-31 13:53 ` Paul Chaignon
0 siblings, 1 reply; 3+ messages in thread
From: syzbot @ 2025-07-31 13:43 UTC (permalink / raw)
To: andrii, ast, bpf, daniel, eddyz87, haoluo, john.fastabend, jolsa,
kpsingh, linux-kernel, martin.lau, paul.chaignon, sdf, song,
syzkaller-bugs, yonghong.song
syzbot has bisected this issue to:
commit 0df1a55afa832f463f9ad68ddc5de92230f1bc8a
Author: Paul Chaignon <paul.chaignon@gmail.com>
Date: Tue Jul 1 18:36:15 2025 +0000
bpf: Warn on internal verifier errors
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=17d6aca2580000
start commit: e8d780dcd957 Merge tag 'slab-for-6.17' of git://git.kernel..
git tree: upstream
final oops: https://syzkaller.appspot.com/x/report.txt?x=1436aca2580000
console output: https://syzkaller.appspot.com/x/log.txt?x=1036aca2580000
kernel config: https://syzkaller.appspot.com/x/.config?x=d32de89be62206c8
dashboard link: https://syzkaller.appspot.com/bug?extid=ccac90e482b2a81d74aa
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=131049bc580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11cc2cf0580000
Reported-by: syzbot+ccac90e482b2a81d74aa@syzkaller.appspotmail.com
Fixes: 0df1a55afa83 ("bpf: Warn on internal verifier errors")
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [syzbot] [bpf?] WARNING in convert_ctx_accesses
2025-07-31 13:43 ` syzbot
@ 2025-07-31 13:53 ` Paul Chaignon
0 siblings, 0 replies; 3+ messages in thread
From: Paul Chaignon @ 2025-07-31 13:53 UTC (permalink / raw)
To: syzbot
Cc: andrii, ast, bpf, daniel, eddyz87, haoluo, john.fastabend, jolsa,
kpsingh, linux-kernel, martin.lau, sdf, song, syzkaller-bugs,
yonghong.song
This is happening because flow_dissector_is_valid_access matches on
ranges (bpf_ctx_range) whereas flow_dissector_convert_ctx_access matches
on offsets (offsetof). Hence an access to
offsetof(struct __sk_buff, data_end) + 1 is considered valid and then
fails during convertion.
I'll send a fix asap.
Paul
On Thu, Jul 31, 2025 at 06:43:05AM -0700, syzbot wrote:
> syzbot has bisected this issue to:
>
> commit 0df1a55afa832f463f9ad68ddc5de92230f1bc8a
> Author: Paul Chaignon <paul.chaignon@gmail.com>
> Date: Tue Jul 1 18:36:15 2025 +0000
>
> bpf: Warn on internal verifier errors
>
> bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=17d6aca2580000
> start commit: e8d780dcd957 Merge tag 'slab-for-6.17' of git://git.kernel..
> git tree: upstream
> final oops: https://syzkaller.appspot.com/x/report.txt?x=1436aca2580000
> console output: https://syzkaller.appspot.com/x/log.txt?x=1036aca2580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=d32de89be62206c8
> dashboard link: https://syzkaller.appspot.com/bug?extid=ccac90e482b2a81d74aa
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=131049bc580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11cc2cf0580000
>
> Reported-by: syzbot+ccac90e482b2a81d74aa@syzkaller.appspotmail.com
> Fixes: 0df1a55afa83 ("bpf: Warn on internal verifier errors")
>
> For information about bisection process see: https://goo.gl/tpsmEJ#bisection
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-31 13:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-31 3:19 [syzbot] [bpf?] WARNING in convert_ctx_accesses syzbot
2025-07-31 13:43 ` syzbot
2025-07-31 13:53 ` Paul Chaignon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox