Commit bba3c570 authored by Jan Kara's avatar Jan Kara Committed by Treehugger Robot
Browse files

UPSTREAM: udf: Avoid using stale lengthOfImpUse



udf_write_fi() uses lengthOfImpUse of the entry it is writing to.
However this field has not yet been initialized so it either contains
completely bogus value or value from last directory entry at that place.
In either case this is wrong and can lead to filesystem corruption or
kernel crashes.

Reported-by: default avatarbutt3rflyh4ck <butterflyhuangxx@gmail.com>
CC: stable@vger.kernel.org
Fixes: 979a6e28 ("udf: Get rid of 0-length arrays in struct fileIdentDesc")
Signed-off-by: default avatarJan Kara <jack@suse.cz>

Bug: 246669914
(cherry picked from commit c1ad35dd)
Signed-off-by: default avatarLecopzer Chen <lecopzer.chen@mediatek.com>
Change-Id: Ib615dd33172106017d7ae7239d2def186b8c0f63
parent 40c02178
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment