linux: harden the linux_pwd_onexec() altroot entry
Do not take the native altroot into account when looking up
linux_emul_path.
Reported by: llm-postcr
Fixes: 9757c0cf98e4 ("chaltroot(2) and fchaltroot(2): new syscalls")
execve(): unshare pwd
Ensure that pwd is not shared when execing into any ABI, so rforked
siblings are not affected. The altroot changes made during exec, by
linux_on_exec() and by the setuid altroot clear, affected rforked
siblings sharing the pwd.
Remove now always no-op pdunshare() call next to fdunshare().
Fixes: fd745e1db6b5 ("linux(4): Use pwd_altroot() to tell namei() about ABI root path")
Fixes: 2137bad49a6f ("exec_new_vmspace(): drop altroot for native processes if setuid")Details
Details
- Reviewers
markj
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped