[PATCH v2 0/2] ocfs2: bound-check both readdir re-validation scans

Zhan Xusheng <[email protected]>
Newsgroups dev.linux.lists.ocfs2-devel,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Andrew, patch 1 replaces
  ocfs2-bound-check-dir-entries-in-the-readdir-re-validation-scan.patch
in mm-nonmm-unstable.  Patch 2 is new.

Both are against that tree rather than mainline, because the patch queued
ahead of them rewrote the ctx->pos line that is now in patch 1's trailing
context.

v1 only bounded the position before de is dereferenced.  Joseph pointed out
that the walk has to stay inside the block as well, which is the second
guard ocfs2_check_dir_entry() applies for the emit loop; patch 1 adds it.
Checking whether anything else re-scans the same way turned up
ocfs2_dir_foreach_blk_id(), which walks the inline data area and is missing
both guards -- that is patch 2, which Joseph has not seen yet.

Neither patch carries Fixes: or Cc: stable, matching the trailers kept for
v1; please add them if you would rather they were there.

Link to v1: https://lore.kernel.org/all/[email protected]/

Zhan Xusheng (2):
  ocfs2: bound-check dir entries in the readdir re-validation scan
  ocfs2: bound-check dir entries in the inline-data re-validation scan

 fs/ocfs2/dir.c | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.