syzbot


memory leak in prepare_creds (4)

Status: upstream: reported C repro on 2023/09/29 13:08
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+2a478080bd86d36bb5ea@syzkaller.appspotmail.com
First crash: 76d, last: 15d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bluetooth?] memory leak in prepare_creds (4) 0 (2) 2023/11/08 07:31
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream memory leak in prepare_creds (3) kernel C 24 320d 598d 0/25 auto-obsoleted due to no activity on 2023/05/24 05:02
upstream memory leak in prepare_creds (2) kernel C 2 899d 994d 22/25 fixed on 2021/11/10 00:50
upstream memory leak in prepare_creds kernel C 10 1025d 1199d 21/25 fixed on 2021/03/10 01:48
Last patch testing requests (3)
Created Duration User Patch Repo Result
2023/11/25 02:03 10m retest repro upstream report log
2023/11/25 02:03 15m retest repro upstream report log
2023/10/09 17:11 19m retest repro upstream report log

Sample crash report:
Warning: Permanently added '10.128.0.113' (ED25519) to the list of known hosts.
executing program
executing program
BUG: memory leak
unreferenced object 0xffff888107c20600 (size 192):
  comm "syz-executor418", pid 5027, jiffies 4294942544 (age 13.100s)
  hex dump (first 32 bytes):
    01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff81630798>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff81630798>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff81630798>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff81630798>] slab_alloc mm/slub.c:3486 [inline]
    [<ffffffff81630798>] __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
    [<ffffffff81630798>] kmem_cache_alloc+0x298/0x430 mm/slub.c:3502
    [<ffffffff812e0d5b>] prepare_creds+0x2b/0x4e0 kernel/cred.c:269
    [<ffffffff812e17c4>] copy_creds+0x44/0x280 kernel/cred.c:373
    [<ffffffff812927ba>] copy_process+0x6aa/0x25c0 kernel/fork.c:2366
    [<ffffffff8129487b>] kernel_clone+0x11b/0x690 kernel/fork.c:2907
    [<ffffffff81294e6c>] __do_sys_clone+0x7c/0xb0 kernel/fork.c:3050
    [<ffffffff84b67d8f>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b67d8f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b

BUG: memory leak
unreferenced object 0xffff888107470a80 (size 16):
  comm "syz-executor418", pid 5027, jiffies 4294942544 (age 13.100s)
  hex dump (first 16 bytes):
    00 00 00 00 00 00 00 00 00 c3 87 00 81 88 ff ff  ................
  backtrace:
    [<ffffffff8163331d>] kmemleak_alloc_recursive include/linux/kmemleak.h:42 [inline]
    [<ffffffff8163331d>] slab_post_alloc_hook mm/slab.h:766 [inline]
    [<ffffffff8163331d>] slab_alloc_node mm/slub.c:3478 [inline]
    [<ffffffff8163331d>] __kmem_cache_alloc_node+0x2dd/0x3f0 mm/slub.c:3517
    [<ffffffff8157e81b>] __do_kmalloc_node mm/slab_common.c:1006 [inline]
    [<ffffffff8157e81b>] __kmalloc+0x4b/0x150 mm/slab_common.c:1020
    [<ffffffff82364631>] kmalloc include/linux/slab.h:604 [inline]
    [<ffffffff82364631>] kzalloc include/linux/slab.h:721 [inline]
    [<ffffffff82364631>] lsm_cred_alloc security/security.c:577 [inline]
    [<ffffffff82364631>] security_prepare_creds+0x121/0x140 security/security.c:2950
    [<ffffffff812e1059>] prepare_creds+0x329/0x4e0 kernel/cred.c:300
    [<ffffffff812e17c4>] copy_creds+0x44/0x280 kernel/cred.c:373
    [<ffffffff812927ba>] copy_process+0x6aa/0x25c0 kernel/fork.c:2366
    [<ffffffff8129487b>] kernel_clone+0x11b/0x690 kernel/fork.c:2907
    [<ffffffff81294e6c>] __do_sys_clone+0x7c/0xb0 kernel/fork.c:3050
    [<ffffffff84b67d8f>] do_syscall_x64 arch/x86/entry/common.c:51 [inline]
    [<ffffffff84b67d8f>] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82
    [<ffffffff84c0008b>] entry_SYSCALL_64_after_hwframe+0x63/0x6b


Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/11/08 07:31 upstream 13d88ac54ddd 83211397 .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-gce-leak memory leak in prepare_creds
2023/11/09 21:01 upstream 6bc986ab839c 56230772 .config console log report syz [disk image] [vmlinux] [kernel image] ci-upstream-gce-leak memory leak in prepare_creds
2023/09/25 13:04 upstream 6465e260f487 0b6a67ac .config console log report syz [disk image] [vmlinux] [kernel image] ci-upstream-gce-leak memory leak in prepare_creds
* Struck through repros no longer work on HEAD.