Skip to content
Commit f4d5a12a authored by Dom Cobley's avatar Dom Cobley
Browse files

fs/ntfs3: Fix memory corruption when page_size changes



The rework in fs/ntfs3: Reduce stack usage
changes log->page_size but doesn't change the associated
log->page_mask and log->page_bits.

That results in the bytes value in read_log_page
getting a negative value, which is bad when it is
passed to memcpy.

The kernel panic can be observed when connecting an
ntfs formatted drive that has previously been connected
to a Windows machine to a Raspberry Pi 5, which by defauilt
uses a 16K kernel pagesize.

Fixes: 865e7a77 ("fs/ntfs3: Reduce stack usage")
Signed-off-by: default avatarDom Cobley <popcornmix@gmail.com>
parent 627f6f12
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment