Skip to content

ipc/shm: shmat() fixes around nil-page

Davidlohr Bueso linux-mm lkml ltp 1 version Applied

Status from this message: [merged] ipc-shm-fix-shmat-nil-address-after-round-down-when-remapping.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2Revert "ipc/shm: Fix shmat mmap nil-page protection"ipc/shm.c+2 -70 repliesApplied
2/2ipc/shm: fix shmat() nil address after round-down when remappingipc/shm.c+0 -00 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH -next 0/2] ipc/shm: shmat() fixes around nil-page

Hi,

These patches fix two issues reported[1] a while back by Joe and Andrea around how shmat(2) behaves with nil-page.

The first reverts a commit that it was incorrectly thought that mapping nil-page (address=0) was a no no with MAP_FIXED. This is not the case, with the exception of SHM_REMAP; which is address in the second patch.

I chose two patches because it is easier to backport and it explicitly reverts bogus behaviour. Both patches ought to be in -stable and ltp testcases need updated (the added testcase around the cve can be modified to just test for SHM_RND|SHM_REMAP).

[1] lkml.kernel.org/r/20180430172152.nfa564pvgpk3ut7p@linux-n805

Thanks!

Davidlohr Bueso (2):
Revert "ipc/shm: Fix shmat mmap nil-page protection" ipc/shm: fix shmat() nil address after round-down when remapping

 ipc/shm.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)
Signature · 1 line
2.13.6