]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
audit: Fix check of return value of strnlen_user()
authorJan Kara <jack@suse.cz>
Tue, 2 Jun 2015 15:08:29 +0000 (17:08 +0200)
committerSasha Levin <alexander.levin@verizon.com>
Mon, 22 Aug 2016 16:23:14 +0000 (12:23 -0400)
commitc786cc5ea29cca704eed6af508d32c9e0d498b77
tree2b9984dfa4cc1aadcb1433a18e01566f8a6c4126
parenteeeec2883cd91c6ad44c41c80ac70f028e97997b
audit: Fix check of return value of strnlen_user()

[ Upstream commit 0b08c5e59441d08ab4b5e72afefd5cd98a4d83df ]

strnlen_user() returns 0 when it hits fault, not -1. Fix the test in
audit_log_single_execve_arg(). Luckily this shouldn't ever happen unless
there's a kernel bug so it's mostly a cosmetic fix.

CC: Paul Moore <pmoore@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Paul Moore <pmoore@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
kernel/auditsc.c