[syzbot] memory leak in prepare_kernel_cred

31 views
Skip to first unread message

syzbot

unread,
Sep 20, 2021, 11:42:37 AM9/20/21
to ak...@linux-foundation.org, ebie...@xmission.com, leg...@kernel.org, linux-...@vger.kernel.org, li...@rasmusvillemoes.dk, syzkall...@googlegroups.com, yangyi...@huawei.com
Hello,

syzbot found the following issue on:

HEAD commit: 4357f03d6611 Merge tag 'pm-5.15-rc2' of git://git.kernel.o..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=16260b9b300000
kernel config: https://syzkaller.appspot.com/x/.config?x=84e947373389eef5
dashboard link: https://syzkaller.appspot.com/bug?extid=b214edc6e43f8da65554
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=17a7cb3b300000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=103f8f2d300000

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

write to /proc/sys/kernel/hung_task_check_interval_secs failed: No such file or directory
write to /proc/sys/kernel/softlockup_all_cpu_backtrace failed: No such file or directory
BUG: memory leak
unreferenced object 0xffff8881046d5480 (size 176):
comm "kworker/u4:0", pid 6631, jiffies 4294994696 (age 35.750s)
hex dump (first 32 bytes):
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 00 ................
backtrace:
[<ffffffff81275931>] prepare_kernel_cred+0x21/0x2e0 kernel/cred.c:724
[<ffffffff8125fc6d>] call_usermodehelper_exec_async+0x5d/0x1c0 kernel/umh.c:91
[<ffffffff8100234f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

BUG: memory leak
unreferenced object 0xffff888102054040 (size 32):
comm "kworker/u4:0", pid 6631, jiffies 4294994696 (age 35.750s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 b0 12 05 40 81 88 ff ff ...........@....
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff8213e79f>] lsm_cred_alloc security/security.c:537 [inline]
[<ffffffff8213e79f>] security_prepare_creds+0x9f/0xc0 security/security.c:1691
[<ffffffff81275ab5>] prepare_kernel_cred+0x1a5/0x2e0 kernel/cred.c:760
[<ffffffff8125fc6d>] call_usermodehelper_exec_async+0x5d/0x1c0 kernel/umh.c:91
[<ffffffff8100234f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

BUG: memory leak
unreferenced object 0xffff8881046d50c0 (size 176):
comm "kworker/u4:0", pid 6633, jiffies 4294994696 (age 35.750s)
hex dump (first 32 bytes):
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 00 ................
backtrace:
[<ffffffff81275931>] prepare_kernel_cred+0x21/0x2e0 kernel/cred.c:724
[<ffffffff8125fc6d>] call_usermodehelper_exec_async+0x5d/0x1c0 kernel/umh.c:91
[<ffffffff8100234f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

BUG: memory leak
unreferenced object 0xffff88810493f6c0 (size 176):
comm "kworker/u4:0", pid 6634, jiffies 4294994696 (age 35.750s)
hex dump (first 32 bytes):
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 00 ................
backtrace:
[<ffffffff81275931>] prepare_kernel_cred+0x21/0x2e0 kernel/cred.c:724
[<ffffffff8125fc6d>] call_usermodehelper_exec_async+0x5d/0x1c0 kernel/umh.c:91
[<ffffffff8100234f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

BUG: memory leak
unreferenced object 0xffff888104cec5e0 (size 32):
comm "kworker/u4:0", pid 6634, jiffies 4294994696 (age 35.750s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 b0 12 05 40 81 88 ff ff ...........@....
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff8213e79f>] lsm_cred_alloc security/security.c:537 [inline]
[<ffffffff8213e79f>] security_prepare_creds+0x9f/0xc0 security/security.c:1691
[<ffffffff81275ab5>] prepare_kernel_cred+0x1a5/0x2e0 kernel/cred.c:760
[<ffffffff8125fc6d>] call_usermodehelper_exec_async+0x5d/0x1c0 kernel/umh.c:91
[<ffffffff8100234f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

BUG: memory leak
unreferenced object 0xffff88810382b780 (size 176):
comm "kworker/u4:0", pid 6637, jiffies 4294994700 (age 35.710s)
hex dump (first 32 bytes):
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 00 ................
backtrace:
[<ffffffff81275931>] prepare_kernel_cred+0x21/0x2e0 kernel/cred.c:724
[<ffffffff8125fc6d>] call_usermodehelper_exec_async+0x5d/0x1c0 kernel/umh.c:91
[<ffffffff8100234f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

BUG: memory leak
unreferenced object 0xffff888102054060 (size 32):
comm "kworker/u4:0", pid 6637, jiffies 4294994700 (age 35.710s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 b0 12 05 40 81 88 ff ff ...........@....
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff8213e79f>] lsm_cred_alloc security/security.c:537 [inline]
[<ffffffff8213e79f>] security_prepare_creds+0x9f/0xc0 security/security.c:1691
[<ffffffff81275ab5>] prepare_kernel_cred+0x1a5/0x2e0 kernel/cred.c:760
[<ffffffff8125fc6d>] call_usermodehelper_exec_async+0x5d/0x1c0 kernel/umh.c:91
[<ffffffff8100234f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

BUG: memory leak
unreferenced object 0xffff888104c0a780 (size 176):
comm "kworker/u4:0", pid 6630, jiffies 4294994702 (age 35.690s)
hex dump (first 32 bytes):
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 00 ................
backtrace:
[<ffffffff81275931>] prepare_kernel_cred+0x21/0x2e0 kernel/cred.c:724
[<ffffffff8125fc6d>] call_usermodehelper_exec_async+0x5d/0x1c0 kernel/umh.c:91
[<ffffffff8100234f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295



---
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

David Kahurani

unread,
Mar 23, 2022, 9:19:58 AM3/23/22
to syzkaller-bugs
Is this issue still present?

syzbot

unread,
Mar 23, 2022, 9:20:01 AM3/23/22
to David Kahurani, k.kah...@gmail.com, syzkall...@googlegroups.com
> Is this issue still present?
>
> #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

I see the command but can't find the corresponding bug.
Please resend the email to syzbo...@syzkaller.appspotmail.com address
that is the sender of the bug report (also present in the Reported-by tag).
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-bug...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-bugs/4554f9a4-ef72-4533-980e-fa4b7f1f21ccn%40googlegroups.com.

David Kahurani

unread,
Mar 23, 2022, 9:26:38 AM3/23/22
to syzbot+b214ed...@syzkaller.appspotmail.com, syzkall...@googlegroups.com
Is this issue still present?

.... 

Aleksandr Nogikh

unread,
Mar 23, 2022, 9:29:13 AM3/23/22
to syzbot+b214ed...@syzkaller.appspotmail.com, David Kahurani, syzkall...@googlegroups.com
Let's add the original email address, so that syzbot can understand
which bug we're asking about.

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-bugs/0000000000002fc28c05dae29645%40google.com.

syzbot

unread,
Mar 23, 2022, 9:29:14 AM3/23/22
to Aleksandr Nogikh, k.kah...@gmail.com, nog...@google.com, syzkall...@googlegroups.com
> Let's add the original email address, so that syzbot can understand
> which bug we're asking about.
>
> #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

want 2 args (repo, branch), got 10

syzbot

unread,
Mar 23, 2022, 9:29:15 AM3/23/22
to 'Aleksandr Nogikh' via syzkaller-bugs, k.kah...@gmail.com, syzkall...@googlegroups.com
> Let's add the original email address, so that syzbot can understand
> which bug we're asking about.
>
> #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

want 2 args (repo, branch), got 10

>
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-bugs/CANp29Y4rvNn1agRfMcxeauAqO74myPeT7_cJAjWf3MC5um26Rw%40mail.gmail.com.

Aleksandr Nogikh

unread,
Mar 23, 2022, 9:30:44 AM3/23/22
to syzbot, 'Aleksandr Nogikh' via syzkaller-bugs, David Kahurani

syzbot

unread,
Mar 23, 2022, 11:37:08 AM3/23/22
to k.kah...@gmail.com, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+b214ed...@syzkaller.appspotmail.com

Tested on:

commit: 6b1f86f8 Merge tag 'folio-5.18b' of git://git.infradea..
git tree: upstream
kernel config: https://syzkaller.appspot.com/x/.config?x=8a018021d40451fc
dashboard link: https://syzkaller.appspot.com/bug?extid=b214edc6e43f8da65554
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2

Note: no patches were applied.
Note: testing is done by a robot and is best-effort only.

syzbot

unread,
Mar 23, 2022, 11:52:09 AM3/23/22
to k.kah...@gmail.com, nog...@google.com, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+b214ed...@syzkaller.appspotmail.com

Tested on:

commit: 6b1f86f8 Merge tag 'folio-5.18b' of git://git.infradea..
git tree: upstream
kernel config: https://syzkaller.appspot.com/x/.config?x=8a018021d40451fc
dashboard link: https://syzkaller.appspot.com/bug?extid=b214edc6e43f8da65554
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2

syzbot

unread,
Nov 4, 2022, 6:04:30 AM11/4/22
to syzkall...@googlegroups.com
Auto-closing this bug as obsolete.
No recent activity, existing reproducers are no longer triggering the issue.
Reply all
Reply to author
Forward
0 new messages