summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@gmail.com>2024-01-24 15:19:36 +0300
committerAndrew Morton <akpm@linux-foundation.org>2024-02-08 08:20:34 +0300
commit67b8bcbaed4777871bb0dcc888fb02a614a98ab1 (patch)
treed2298ec0d377f20a6813f0864fd25a08db784da3 /mm
parent56ae10cf628b02279980d17439c6241a643959c2 (diff)
downloadlinux-67b8bcbaed4777871bb0dcc888fb02a614a98ab1.tar.xz
nilfs2: fix data corruption in dsync block recovery for small block sizes
The helper function nilfs_recovery_copy_block() of nilfs_recovery_dsync_blocks(), which recovers data from logs created by data sync writes during a mount after an unclean shutdown, incorrectly calculates the on-page offset when copying repair data to the file's page cache. In environments where the block size is smaller than the page size, this flaw can cause data corruption and leak uninitialized memory bytes during the recovery process. Fix these issues by correcting this byte offset calculation on the page. Link: https://lkml.kernel.org/r/20240124121936.10575-1-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com> Tested-by: Ryusuke Konishi <konishi.ryusuke@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions