* [GIT PULL] AFFS fix for 7.1
@ 2026-04-10 1:38 David Sterba
2026-04-10 1:38 ` [PATCH 1/1] affs: bound hash_pos before table lookup in affs_readdir David Sterba
2026-04-14 0:29 ` [GIT PULL] AFFS fix for 7.1 pr-tracker-bot
0 siblings, 2 replies; 3+ messages in thread
From: David Sterba @ 2026-04-10 1:38 UTC (permalink / raw)
To: torvalds; +Cc: David Sterba, linux-fsdevel, linux-kernel
Hi,
please pull an AFFS fix. There's a potential out-of-bounds read in the
directory hash table during readdir.
Thanks.
----------------------------------------------------------------
The following changes since commit c369299895a591d96745d6492d4888259b004a9e:
Linux 7.0-rc5 (2026-03-22 14:42:17 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git tags/affs-for-7.1-tag
for you to fetch changes up to 6fa253b38b9b293a0de2a361de400557ca7666ca:
affs: bound hash_pos before table lookup in affs_readdir (2026-04-10 02:51:05 +0200)
----------------------------------------------------------------
Hyungjung Joo (1):
affs: bound hash_pos before table lookup in affs_readdir
fs/affs/dir.c | 2 ++
1 file changed, 2 insertions(+)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] affs: bound hash_pos before table lookup in affs_readdir
2026-04-10 1:38 [GIT PULL] AFFS fix for 7.1 David Sterba
@ 2026-04-10 1:38 ` David Sterba
2026-04-14 0:29 ` [GIT PULL] AFFS fix for 7.1 pr-tracker-bot
1 sibling, 0 replies; 3+ messages in thread
From: David Sterba @ 2026-04-10 1:38 UTC (permalink / raw)
To: torvalds; +Cc: Hyungjung Joo, linux-fsdevel, linux-kernel, David Sterba
From: Hyungjung Joo <jhj140711@gmail.com>
affs_readdir() decodes ctx->pos into hash_pos and chain_pos and then
dereferences AFFS_HEAD(dir_bh)->table[hash_pos] before validating
that hash_pos is within the runtime table bound. Treat out-of-range
positions as end-of-directory before the first table lookup.
Signed-off-by: Hyungjung Joo <jhj140711@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
---
fs/affs/dir.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/affs/dir.c b/fs/affs/dir.c
index 5c8d83387a39..075c18c4ccde 100644
--- a/fs/affs/dir.c
+++ b/fs/affs/dir.c
@@ -119,6 +119,8 @@ affs_readdir(struct file *file, struct dir_context *ctx)
pr_debug("readdir() left off=%d\n", ino);
goto inside;
}
+ if (hash_pos >= AFFS_SB(sb)->s_hashsize)
+ goto done;
ino = be32_to_cpu(AFFS_HEAD(dir_bh)->table[hash_pos]);
for (i = 0; ino && i < chain_pos; i++) {
--
2.51.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [GIT PULL] AFFS fix for 7.1
2026-04-10 1:38 [GIT PULL] AFFS fix for 7.1 David Sterba
2026-04-10 1:38 ` [PATCH 1/1] affs: bound hash_pos before table lookup in affs_readdir David Sterba
@ 2026-04-14 0:29 ` pr-tracker-bot
1 sibling, 0 replies; 3+ messages in thread
From: pr-tracker-bot @ 2026-04-14 0:29 UTC (permalink / raw)
To: David Sterba; +Cc: torvalds, David Sterba, linux-fsdevel, linux-kernel
The pull request you sent on Fri, 10 Apr 2026 03:38:25 +0200:
> git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git tags/affs-for-7.1-tag
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/f3756afb6f6cdcbbc246f1edd0580b8c7485124a
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-14 0:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-10 1:38 [GIT PULL] AFFS fix for 7.1 David Sterba
2026-04-10 1:38 ` [PATCH 1/1] affs: bound hash_pos before table lookup in affs_readdir David Sterba
2026-04-14 0:29 ` [GIT PULL] AFFS fix for 7.1 pr-tracker-bot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.