]> www.infradead.org Git - users/jedix/linux-maple.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)
committerDhaval Giani <dhaval.giani@oracle.com>
Fri, 20 Jan 2017 22:22:08 +0000 (17:22 -0500)
commita823f8f33615840e0f874282053a8884a3279ce0
tree88d92446e5137819a4186300ce234adb6653ac49
parent08e9333a04aadf1653f0148668bf4ed6c132264c
audit: Fix check of return value of strnlen_user()

Orabug: 25308127

[ 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>
(cherry picked from commit a49b282f08d96cd73838e4e1a5ace747d432ba7d)
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
kernel/auditsc.c