]> git.karo-electronics.de Git - karo-tx-linux.git/commit
security/smack: fix oops when setting a size 0 SMACK64 xattr
authorEtienne Basset <etienne.basset@numericable.fr>
Tue, 31 Mar 2009 21:54:11 +0000 (23:54 +0200)
committerChris Wright <chrisw@sous-sol.org>
Mon, 27 Apr 2009 17:36:51 +0000 (10:36 -0700)
commit97ecdadc284e820931f27c6345b0ff8b85792346
treee5b71a128283ca506587df1e99d2d30f201d38d8
parent8d7bff2d72660d9d60aa371ae3d1356bbf329a09
security/smack: fix oops when setting a size 0 SMACK64 xattr

upstream commit: 4303154e86597885bc3cbc178a48ccbc8213875f

this patch fix an oops in smack when setting a size 0 SMACK64 xattr eg
attr -S -s SMACK64  -V '' somefile
This oops because smk_import_entry treats a 0 length as SMK_MAXLEN

Signed-off-by: Etienne Basset <etienne.basset@numericable.fr>
Reviewed-by: James Morris <jmorris@namei.org>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
security/smack/smack_lsm.c