Re: [syzbot] [bpf?] WARNING: bad unlock balance in bpf

From: Daniel Borkmann
Date: Fri May 26 2023 - 08:52:44 EST


On 5/26/23 12:10 PM, syzbot wrote:
Hello,

syzbot found the following issue on:

HEAD commit: c4c84f6fb2c4 bpf: drop unnecessary bpf_capable() check in ..
git tree: bpf-next
console+strace: https://syzkaller.appspot.com/x/log.txt?x=119576a9280000
kernel config: https://syzkaller.appspot.com/x/.config?x=8bc832f563d8bf38
dashboard link: https://syzkaller.appspot.com/bug?extid=8982e75c2878b9ffeac5
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10391dde280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=137da9c5280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/3cb57feeb883/disk-c4c84f6f.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/7ccb6d78c42d/vmlinux-c4c84f6f.xz
kernel image: https://storage.googleapis.com/syzbot-assets/fb02c9cdb21c/bzImage-c4c84f6f.xz

The issue was bisected to:

commit c4c84f6fb2c4dc4c0f5fd927b3c3d3fd28b7030e
Author: Andrii Nakryiko <andrii@xxxxxxxxxx>
Date: Wed May 24 22:54:19 2023 +0000

bpf: drop unnecessary bpf_capable() check in BPF_MAP_FREEZE command

[...]

Fyi, fixed this up today in bpf-next tree.

#syz fix: bpf: Fix bad unlock balance on freeze_mutex