summaryrefslogtreecommitdiffstats
path: root/kernel/memremap.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2019-05-15 22:54:56 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-26 09:11:01 +0200
commit2f0e9eed11ca778d0ec5507a739c28472fd4ca20 (patch)
treecf69bc7355826cf2d237c15cbcac92ad80a48688 /kernel/memremap.c
parent1852befc685e413a7f86a4fc2b8666e7533b6660 (diff)
downloadlinux-stable-2f0e9eed11ca778d0ec5507a739c28472fd4ca20.tar.gz
linux-stable-2f0e9eed11ca778d0ec5507a739c28472fd4ca20.tar.bz2
linux-stable-2f0e9eed11ca778d0ec5507a739c28472fd4ca20.zip
signal: Correct namespace fixups of si_pid and si_uid
commit 7a0cf094944e2540758b7f957eb6846d5126f535 upstream. The function send_signal was split from __send_signal so that it would be possible to bypass the namespace logic based upon current[1]. As it turns out the si_pid and the si_uid fixup are both inappropriate in the case of kill_pid_usb_asyncio so move that logic into send_signal. It is difficult to arrange but possible for a signal with an si_code of SI_TIMER or SI_SIGIO to be sent across namespace boundaries. In which case tests for when it is ok to change si_pid and si_uid based on SI_FROMUSER are incorrect. Replace the use of SI_FROMUSER with a new test has_si_pid_and_used based on siginfo_layout. Now that the uid fixup is no longer present after expanding SEND_SIG_NOINFO properly calculate the si_uid that the target task needs to read. [1] 7978b567d315 ("signals: add from_ancestor_ns parameter to send_signal()") Cc: stable@vger.kernel.org Fixes: 6588c1e3ff01 ("signals: SI_USER: Masquerade si_pid when crossing pid ns boundary") Fixes: 6b550f949594 ("user namespace: make signal.c respect user namespaces") Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/memremap.c')
0 files changed, 0 insertions, 0 deletions