Skip to content

nilfs2: fix UBSAN shift-out-of-bounds warnings on mount time

Ryusuke Konishi linux-nilfs lkml 1 version Applied

Status from this message: [merged mm-nonmm-stable] nilfs2-fix-shift-out-of-bounds-overflow-in-nilfs_sb2_bad_offset.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2nilfs2: fix shift-out-of-bounds/overflow in nilfs_sb2_bad_offset()fs/nilfs2/the_nilfs.c+27 -40 repliesApplied
2/2nilfs2: fix shift-out-of-bounds due to too large exponent of block sizefs/nilfs2/the_nilfs.c+38 -40 repliesApplied

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchRyusuke Konishi
1/2T-b
2/2T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] nilfs2: fix UBSAN shift-out-of-bounds warnings on mount time

Hi Andrew,

please apply the following bug fixes to -mm tree:

Ryusuke Konishi (2):
nilfs2: fix shift-out-of-bounds/overflow in nilfs_sb2_bad_offset()
nilfs2: fix shift-out-of-bounds due to too large exponent of block
size

The first patch fixes a reported bug by syzbot, and the second one fixes the remaining bug of the same kind. Although they are triggered by the same super block data anomaly, I divided it into the above two because the details of the issues and how to fix it are different.

Both are required to eliminate the shift-out-of-bounds issues on mount time.

Thanks,
Ryusuke Konishi

 fs/nilfs2/the_nilfs.c | 73 ++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 65 insertions(+), 8 deletions(-)
Signature · 1 line
2.34.1