auditsc: audit_krule mask accesses need bounds checking
authorAndy Lutomirski <luto@amacapital.net>
Thu, 29 May 2014 03:09:58 +0000 (23:09 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 11 Jul 2014 12:33:49 +0000 (13:33 +0100)
commit38831a0a5984c10d6763aba7e3fffe7fe04a1741
treeb5f6144ed5e3f3ec9edc1840d57559a515445799
parent191fe265097bcc50471cda5e1a0112216dbd438d
auditsc: audit_krule mask accesses need bounds checking

commit a3c54931199565930d6d84f4c3456f6440aefd41 upstream.

Fixes an easy DoS and possible information disclosure.

This does nothing about the broken state of x32 auditing.

eparis: If the admin has enabled auditd and has specifically loaded
audit rules.  This bug has been around since before git.  Wow...

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[bwh: Backported to 3.2: audit_filter_inode_name() is not a separate
 function but part of audit_filter_inodes()]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
kernel/auditsc.c