]> www.infradead.org Git - users/dwmw2/linux.git/commit
pidfs: when time ns disabled add check for ioctl
authorEdward Adam Davis <eadavis@qq.com>
Sun, 21 Jul 2024 06:23:12 +0000 (14:23 +0800)
committerChristian Brauner <brauner@kernel.org>
Wed, 24 Jul 2024 08:53:12 +0000 (10:53 +0200)
commitf60d38cb02d03f39576f9c7ad13652babded2410
treef2c36c5e65e7db512350db5e3e778c8c7f724728
parentb40c8e7a033ff2cafd33adbe50e2a516f88fa223
pidfs: when time ns disabled add check for ioctl

syzbot call pidfd_ioctl() with cmd "PIDFD_GET_TIME_NAMESPACE" and disabled
CONFIG_TIME_NS, since time_ns is NULL, it will make NULL ponter deref in
open_namespace.

Fixes: 5b08bd408534 ("pidfs: allow retrieval of namespace file descriptors") # mainline only
Reported-and-tested-by: syzbot+34a0ee986f61f15da35d@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=34a0ee986f61f15da35d
Signed-off-by: Edward Adam Davis <eadavis@qq.com>
Link: https://lore.kernel.org/r/tencent_7FAE8DB725EE0DD69236DDABDDDE195E4F07@qq.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/pidfs.c