Skip to content

nilfs2: fix potential issues related to reserved inodes

Ryusuke Konishi linux-fsdevel linux-mm linux-nilfs lkml 1 version Applied

Status from this message: [merged mm-hotfixes-stable] nilfs2-fix-incorrect-inode-allocation-from-reserved-inodes.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesApplied 3/3

Patches in v1 All 3 applied

#Subject and filesSizeRepliesApplied
1/3nilfs2: fix inode number range checksfs/nilfs2/nilfs.h fs/nilfs2/the_nilfs.c fs/nilfs2/the_nilfs.h+10 -30 repliesApplied
2/3nilfs2: add missing check for inode numbers on directory entriesfs/nilfs2/dir.c fs/nilfs2/nilfs.h+11 -00 repliesApplied
3/3nilfs2: fix incorrect inode allocation from reserved inodesfs/nilfs2/alloc.c fs/nilfs2/alloc.h fs/nilfs2/dat.c +1 more+20 -120 repliesApplied

Reviews trailers per patch

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

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

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/3] nilfs2: fix potential issues related to reserved inodes

Hi Andrew, please apply this bug fix series.

This series fixes one use-after-free issue reported by syzbot, caused by nilfs2's internal inode being exposed in the namespace on a corrupted filesystem, and a couple of flaws that cause problems if the starting number of non-reserved inodes written in the on-disk super block is intentionally (or corruptly) changed from its default value.

Thanks,
Ryusuke Konishi

Ryusuke Konishi (3):
nilfs2: fix inode number range checks
nilfs2: add missing check for inode numbers on directory entries
nilfs2: fix incorrect inode allocation from reserved inodes

 fs/nilfs2/alloc.c     | 19 +++++++++++++++----
 fs/nilfs2/alloc.h     |  4 ++--
 fs/nilfs2/dat.c       |  2 +-
 fs/nilfs2/dir.c       |  6 ++++++
 fs/nilfs2/ifile.c     |  7 ++-----
 fs/nilfs2/nilfs.h     | 10 ++++++++--
 fs/nilfs2/the_nilfs.c |  6 ++++++
 fs/nilfs2/the_nilfs.h |  2 +-
 8 files changed, 41 insertions(+), 15 deletions(-)
Signature · 1 line
2.34.1