summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
diff options
context:
space:
mode:
authorNamjae Jeon <linkinjeon@kernel.org>2023-07-13 21:59:37 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-11 12:08:26 +0200
commitc2fdf827f8fc6a571e1b7cc38a61041f0321adf5 (patch)
tree4a4ac4a6a68eb551a8bfa936782e957c699a6b61 /drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
parente2fb24ce37caeaecff08af4e9967c8462624312b (diff)
exfat: check if filename entries exceeds max filename length
[ Upstream commit d42334578eba1390859012ebb91e1e556d51db49 ] exfat_extract_uni_name copies characters from a given file name entry into the 'uniname' variable. This variable is actually defined on the stack of the exfat_readdir() function. According to the definition of the 'exfat_uni_name' type, the file name should be limited 255 characters (+ null teminator space), but the exfat_get_uniname_from_ext_entry() function can write more characters because there is no check if filename entries exceeds max filename length. This patch add the check not to copy filename characters when exceeding max filename length. Cc: stable@vger.kernel.org Cc: Yuezhang Mo <Yuezhang.Mo@sony.com> Reported-by: Maxim Suhanov <dfirblog@gmail.com> Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c')
0 files changed, 0 insertions, 0 deletions