Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
cve-2017-5669.c needs fix for shmat() nil addresses #319
According to upstream thread (https://lkml.org/lkml/2018/5/28/2056) , cve-2017-5669 needs to address the "new" way of handling nil addresses for shmat() when used with MAP_FIXED or SHM_REMAP flags.
Based on original discussion: https://marc.info/?i=20180430172152.nfa564pvgpk3ut7p%40linux-n805
You will find initial motivation for the patches:
In 4.17-rc7 you will find:
TODO: Make sure a call to shmat() with SHM_RND & SHM_REMAP flags can't succeed for nil addresses (-EINVAL has to be returned), changing the current test that only tests SHM_RND flag.
pushed a commit
May 30, 2018
with previous ltp and old kernel
with patched ltp and previous kernel
with previous ltp and mainline kernel
with patched ltp and mainline kernel