diff options
author | Norbert Szetei <norbert@doyensec.com> | 2025-03-29 09:58:15 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2025-04-01 08:04:21 +0300 |
commit | beff0bc9d69bc8e733f9bca28e2d3df5b3e10e42 (patch) | |
tree | dec042705da83968d26b38cb0bf5c4dc0386eac1 /lib/test_fortify/write_overflow-strncpy.c | |
parent | fa4cdb8cbca7d6cb6aa13e4d8d83d1103f6345db (diff) | |
download | linux-beff0bc9d69bc8e733f9bca28e2d3df5b3e10e42.tar.xz |
ksmbd: fix overflow in dacloffset bounds check
The dacloffset field was originally typed as int and used in an
unchecked addition, which could overflow and bypass the existing
bounds check in both smb_check_perm_dacl() and smb_inherit_dacl().
This could result in out-of-bounds memory access and a kernel crash
when dereferencing the DACL pointer.
This patch converts dacloffset to unsigned int and uses
check_add_overflow() to validate access to the DACL.
Cc: stable@vger.kernel.org
Signed-off-by: Norbert Szetei <norbert@doyensec.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy.c')
0 files changed, 0 insertions, 0 deletions