Commit 1376327c authored by Committed by Linus Torvalds
ipc/shm.c: check for integer overflow during shmget.
SHMMAX is the upper limit for the size of a shared memory segment, counted in bytes. The actual allocation is that size, rounded up to the next full page. Add a check that prevents the creation of segments where the rounded up size causes an integer overflow. Signed-off-by: Manfred Spraul <email@example.com> Acked-by: Davidlohr Bueso <firstname.lastname@example.org> Acked-by: KOSAKI Motohiro <email@example.com> Acked-by: Michael Kerrisk <firstname.lastname@example.org> Signed-off-by: Andrew Morton <email@example.com> Signed-off-by: Linus Torvalds <firstname.lastname@example.org>
Showing with 3 additions and 0 deletions