From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+34a0ee986f61f15da35d@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [fs?] BUG: unable to handle kernel NULL pointer dereference in path_from_stashed
Date: Sun, 21 Jul 2024 12:50:16 +0800 [thread overview]
Message-ID: <tencent_9A6EFE8CB8A7FC86C992CAC6744992EED206@qq.com> (raw)
In-Reply-To: <000000000000cf8462061db0699c@google.com>
time_ns is null ?
#syz test: upstream 5e0497553643
diff --git a/fs/pidfs.c b/fs/pidfs.c
index c9cb14181def..fdae58eb1d98 100644
--- a/fs/pidfs.c
+++ b/fs/pidfs.c
@@ -168,6 +168,8 @@ static long pidfd_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
case PIDFD_GET_TIME_NAMESPACE:
get_time_ns(nsp->time_ns);
ns_common = to_ns_common(nsp->time_ns);
+ if (!nsp->time_ns)
+ return -EINVAL;
break;
case PIDFD_GET_TIME_FOR_CHILDREN_NAMESPACE:
get_time_ns(nsp->time_ns_for_children);
next prev parent reply other threads:[~2024-07-21 4:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-20 16:36 syzbot
2024-07-21 4:50 ` Edward Adam Davis [this message]
2024-07-21 4:57 ` syzbot
2024-07-21 5:14 ` Edward Adam Davis
2024-07-21 5:41 ` syzbot
2024-07-21 6:23 ` [PATCH] fs/pidfs: when time ns disabled add check for ioctl Edward Adam Davis
2024-07-21 10:59 ` Matthew Wilcox
2024-07-22 8:00 ` Christian Brauner
2024-07-22 13:13 ` [PATCH 1/2] pidfs: handle kernels without namespaces cleanly Christian Brauner
2024-07-22 13:13 ` [PATCH 2/2] pidfs: add selftests for new namespace ioctls Christian Brauner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tencent_9A6EFE8CB8A7FC86C992CAC6744992EED206@qq.com \
--to=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+34a0ee986f61f15da35d@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®