diff options
author | Kees Cook <keescook@chromium.org> | 2022-02-06 09:08:20 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-08 14:23:54 +0200 |
commit | 999ee266531bb38497a1ddef03f482961f3ae0e4 (patch) | |
tree | 611e4142a37fc63f42a5c49b39a2738610f5fa44 /security/selinux/hooks.c | |
parent | ca97dfbda5105f9b6220ff286c07367633ff2b55 (diff) |
gcc-plugins/stackleak: Exactly match strings instead of prefixes
[ Upstream commit 27e9faf415dbf94af19b9c827842435edbc1fbbc ]
Since STRING_CST may not be NUL terminated, strncmp() was used for check
for equality. However, this may lead to mismatches for longer section
names where the start matches the tested-for string. Test for exact
equality by checking for the presences of NUL termination.
Cc: Alexander Popov <alex.popov@linux.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'security/selinux/hooks.c')
0 files changed, 0 insertions, 0 deletions