mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] ocfs2: bound-check both readdir re-validation scans
@ 2026-08-11  2:43 Zhan Xusheng
  2026-08-11  2:43 ` [PATCH v2 1/2] ocfs2: bound-check dir entries in the readdir re-validation scan Zhan Xusheng
  2026-08-11  2:43 ` [PATCH v2 2/2] ocfs2: bound-check dir entries in the inline-data " Zhan Xusheng
  0 siblings, 2 replies; 7+ messages in thread
From: Zhan Xusheng @ 2026-08-11  2:43 UTC (permalink / raw)
  To: Andrew Morton, Joseph Qi
  Cc: Mark Fasheh, Joel Becker, Junxiao Bi, Changwei Ge, Jun Piao,
	Heming Zhao, ocfs2-devel, linux-kernel, zhanxusheng

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/20260806122133.956847-1-zhanxusheng@xiaomi.com/

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-08-12  2:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-11  2:43 [PATCH v2 0/2] ocfs2: bound-check both readdir re-validation scans Zhan Xusheng
2026-08-11  2:43 ` [PATCH v2 1/2] ocfs2: bound-check dir entries in the readdir re-validation scan Zhan Xusheng
2026-08-11  6:59   ` Joseph Qi
2026-08-12  2:22   ` Andrew Morton
2026-08-12  2:37     ` Zhan Xusheng
2026-08-11  2:43 ` [PATCH v2 2/2] ocfs2: bound-check dir entries in the inline-data " Zhan Xusheng
2026-08-11  6:59   ` Joseph Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®