The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/3] udf: refactor udf_current_aext()/udf_next_aext() to handle error
@ 2024-09-18  9:36 Zhao Mengmeng
  2024-09-18  9:36 ` [PATCH 1/3] udf: refactor udf_current_aext() " Zhao Mengmeng
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Zhao Mengmeng @ 2024-09-18  9:36 UTC (permalink / raw)
  To: jack, zhaomengmeng; +Cc: linux-kernel

From: Zhao Mengmeng <zhaomengmeng@kylinos.cn>

syzbot reports a udf slab-out-of-bounds at [1] and I proposed a fix patch,
after talking with Jan, a better way to fix this is to refactor 
udf_current_aext() and udf_next_aext() to differentiate between error and
"hit EOF".
This series refactor udf_current_aext(), udf_next_aext() and inode_bmap(),
they take pointer to etype to store the extent type and just return 0 on 
success, <0 on error. It has passed the syz repro test.



[1]. https://lore.kernel.org/all/0000000000005093590621340ecf@google.com/

Zhao Mengmeng (3):
  udf: refactor udf_current_aext() to handle error
  udf: refactor udf_next_aext() to handle error
  udf: refactor inode_bmap() to handle error

 fs/udf/balloc.c    |   6 +--
 fs/udf/directory.c |  20 +++++---
 fs/udf/inode.c     | 112 ++++++++++++++++++++++++++-------------------
 fs/udf/partition.c |   6 ++-
 fs/udf/super.c     |   3 +-
 fs/udf/truncate.c  |  16 +++----
 fs/udf/udfdecl.h   |  15 +++---
 7 files changed, 104 insertions(+), 74 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2024-09-25  7:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-18  9:36 [PATCH 0/3] udf: refactor udf_current_aext()/udf_next_aext() to handle error Zhao Mengmeng
2024-09-18  9:36 ` [PATCH 1/3] udf: refactor udf_current_aext() " Zhao Mengmeng
2024-09-20 15:09   ` Jan Kara
2024-09-23  1:35     ` Zhao Mengmeng
2024-09-18  9:36 ` [PATCH 2/3] udf: refactor udf_next_aext() " Zhao Mengmeng
2024-09-20 15:47   ` Jan Kara
2024-09-23  3:05     ` Zhao Mengmeng
2024-09-24 12:08     ` Zhao Mengmeng
2024-09-25  7:05       ` Jan Kara
2024-09-18  9:36 ` [PATCH 3/3] udf: refactor inode_bmap() " Zhao Mengmeng
2024-09-20 16:00   ` Jan Kara

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