smack: off by one error
authorAlan Cox <alan@linux.intel.com>
Thu, 26 Jul 2012 21:47:11 +0000 (14:47 -0700)
committerElena Reshetova <elena.reshetova@intel.com>
Fri, 19 Oct 2012 10:48:15 +0000 (13:48 +0300)
commit141a80e422ef5cc3ec0b111ffe506f14dae82725
treec27cd32229d4008f07087c1b86988d543ecdd8c8
parent31cad4f622b2ec2b7911a136fb8d05714534d23d
smack: off by one error

Consider the input case of a rule that consists entirely of non space
symbols followed by a \0. Say 64 + \0

In this case strlen(data) = 64
kzalloc of subject and object are 64 byte objects
sscanfdata, "%s %s %s", subject, ...)

will put 65 bytes into subject.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Cc: stable@vger.kernel.org
Signed-off-by: James Morris <james.l.morris@oracle.com>
security/smack/smackfs.c