[PATCH v3] proc: proc_pid_ns takes super_block as an argument

Tetsuo Handa penguin-kernel at i-love.sakura.ne.jp
Mon May 18 15:36:34 UTC 2020

I would shorten like below:

syzbot found that

  touch /proc/testfile

causes NULL pointer dereference at tomoyo_get_local_path()
because inode of the dentry is NULL.

Before c59f415a7cb6, Tomoyo received pid_ns from proc's s_fs_info
directly. Since proc_pid_ns() can only work with inode, using it in
the tomoyo_get_local_path() was wrong.

To avoid creating more functions for getting proc_ns, change the
argument type of the proc_pid_ns() function. Then, Tomoyo can use
the existing super_block to get pid_ns.

More information about the Linux-security-module-archive mailing list