syzbot


memory leak in keyctl_watch_key

Status: fixed on 2023/02/24 13:50
Subsystems: keyrings lsm
[Documentation on labels]
Reported-by: syzbot+6e2de48f06cdb2884bfc@syzkaller.appspotmail.com
Fix commit: 3d8dcf278b1e watch_queue: Actually free the watch
First crash: 770d, last: 770d
Discussions (6)
Title Replies (including bot) Last reply
[PATCH 5.10 000/599] 5.10.110-rc1 review 628 (629) 2022/05/08 12:31
[PATCH 5.16 0000/1017] 5.16.19-rc1 review 1034 (1035) 2022/04/07 08:34
[PATCH 5.15 000/913] 5.15.33-rc1 review 932 (933) 2022/04/06 15:36
[PATCH 5.17 0000/1126] 5.17.2-rc1 review 1143 (1144) 2022/04/06 14:06
[PATCH 0/2] watch_queue: A couple more fixes 5 (5) 2022/03/22 09:55
[syzbot] memory leak in keyctl_watch_key 1 (3) 2022/03/21 11:51
Last patch testing requests (1)
Created Duration User Patch Repo Result
2022/03/21 11:41 9m dhowells@redhat.com git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git c82efd1dfb229d6aa7e08d57d1c41f034d97b1eb OK

Sample crash report:
Warning: Permanently added '10.128.10.13' (ECDSA) to the list of known hosts.
executing program
executing program
BUG: memory leak
unreferenced object 0xffff88810ce4a200 (size 96):
  comm "syz-executor352", pid 3605, jiffies 4294947473 (age 13.720s)
  hex dump (first 32 bytes):
    e0 82 48 0d 81 88 ff ff 00 00 00 00 00 00 00 00  ..H.............
    80 a2 e4 0c 81 88 ff ff 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff8214e6cc>] kmalloc include/linux/slab.h:581 [inline]
    [<ffffffff8214e6cc>] kzalloc include/linux/slab.h:714 [inline]
    [<ffffffff8214e6cc>] keyctl_watch_key+0xec/0x2e0 security/keys/keyctl.c:1800
    [<ffffffff8214ec84>] __do_sys_keyctl+0x3c4/0x490 security/keys/keyctl.c:2016
    [<ffffffff84493a25>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84493a25>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84600068>] entry_SYSCALL_64_after_hwframe+0x44/0xae


Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/03/16 23:28 upstream 56e337f2cf13 dfa9a8ed .config console log report syz C ci-upstream-gce-leak memory leak in keyctl_watch_key
* Struck through repros no longer work on HEAD.