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 <firstname.lastname@example.org> Acked-by: Davidlohr Bueso <email@example.com> Acked-by: KOSAKI Motohiro <firstname.lastname@example.org> Acked-by: Michael Kerrisk <email@example.com> Signed-off-by: Andrew Morton <firstname.lastname@example.org> Signed-off-by: Linus Torvalds <email@example.com>
Showing with 3 additions and 0 deletions