]> git.baikalelectronics.ru Git - kernel.git/commit
smack: do not dereference NULL ipc object
authorAhmed S. Darwish <darwish.07@gmail.com>
Thu, 20 Mar 2008 00:00:51 +0000 (17:00 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 20 Mar 2008 01:53:36 +0000 (18:53 -0700)
commita56fb2a015735670b3d734c83999bc3b07935a08
tree4a7b956c01487454b139e1df271518f36ca32285
parent3ece9d927a0e3fdbbe4c1b278e1d2d926eb6d4c9
smack: do not dereference NULL ipc object

In the SYSV ipc msgctl(),semctl(),shmctl() family, if the user passed *_INFO
as the desired operation, no specific object is meant to be controlled and
only system-wide information is returned.  This leads to a NULL IPC object in
the LSM hooks if the _INFO flag is given.

Avoid dereferencing this NULL pointer in Smack ipc *ctl() methods.

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
security/smack/smack_lsm.c