]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ipc/shm.c: check for integer overflow during shmget.
authorManfred Spraul <manfred@colorfullife.com>
Thu, 22 May 2014 00:44:17 +0000 (10:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 22 May 2014 00:44:17 +0000 (10:44 +1000)
commita74aeb1e47a31bd195bc4bd5b716f011e8a65302
tree94ea0c6f63527e1bb92b7894ff41260126ac8dac
parentdd585f2a27a45f3a6ec2741e459cd5ef73e26fcd
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 <manfred@colorfullife.com>
Acked-by: Davidlohr Bueso <davidlohr@hp.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
ipc/shm.c