diff options
| author | Vegard Nossum <[email protected]> | 2016-07-07 20:41:11 +0000 |
|---|---|---|
| committer | James Morris <[email protected]> | 2016-07-08 00:26:25 +0000 |
| commit | 30a46a4647fd1df9cf52e43bf467f0d9265096ca (patch) | |
| tree | 2cec69fc7fc82731f7a1845eba336aeb5d867cc8 /fs/jbd2/commit.c | |
| parent | Merge branch 'for-linus' of git://git.kernel.dk/linux-block (diff) | |
| download | kernel-30a46a4647fd1df9cf52e43bf467f0d9265096ca.tar.gz kernel-30a46a4647fd1df9cf52e43bf467f0d9265096ca.zip | |
apparmor: fix oops, validate buffer size in apparmor_setprocattr()
When proc_pid_attr_write() was changed to use memdup_user apparmor's
(interface violating) assumption that the setprocattr buffer was always
a single page was violated.
The size test is not strictly speaking needed as proc_pid_attr_write()
will reject anything larger, but for the sake of robustness we can keep
it in.
SMACK and SELinux look safe to me, but somebody else should probably
have a look just in case.
Based on original patch from Vegard Nossum <[email protected]>
modified for the case that apparmor provides null termination.
Fixes: bb646cdb12e75d82258c2f2e7746d5952d3e321a
Reported-by: Vegard Nossum <[email protected]>
Cc: Al Viro <[email protected]>
Cc: John Johansen <[email protected]>
Cc: Paul Moore <[email protected]>
Cc: Stephen Smalley <[email protected]>
Cc: Eric Paris <[email protected]>
Cc: Casey Schaufler <[email protected]>
Cc: [email protected]
Signed-off-by: John Johansen <[email protected]>
Reviewed-by: Tyler Hicks <[email protected]>
Signed-off-by: James Morris <[email protected]>
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions
