diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-09-19 06:38:43 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-09-19 06:38:43 +0200 |
commit | cc3804443b4b367aba9eed58bb98959376bce1d1 (patch) | |
tree | 595eed2e133ced98ab541e3a6ae1bd27dd84f876 /fs/jfs/jfs_imap.c | |
parent | 45d986d11313ff2d8ed2cf6a34e2aefdc4639a99 (diff) | |
parent | 2b59ffad47db1c46af25ccad157bb3b25147c35c (diff) |
Merge tag 'jfs-6.12' of github.com:kleikamp/linux-shaggy
Pull jfs updates from David Kleikamp:
"A few fixes for jfs"
* tag 'jfs-6.12' of github.com:kleikamp/linux-shaggy:
jfs: Fix uninit-value access of new_ea in ea_buffer
jfs: check if leafidx greater than num leaves per dmap tree
jfs: Fix uaf in dbFreeBits
jfs: fix out-of-bounds in dbNextAG() and diAlloc()
jfs: UBSAN: shift-out-of-bounds in dbFindBits
Diffstat (limited to 'fs/jfs/jfs_imap.c')
-rw-r--r-- | fs/jfs/jfs_imap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c index 1407feccbc2d..a360b24ed320 100644 --- a/fs/jfs/jfs_imap.c +++ b/fs/jfs/jfs_imap.c @@ -1360,7 +1360,7 @@ int diAlloc(struct inode *pip, bool dir, struct inode *ip) /* get the ag number of this iag */ agno = BLKTOAG(JFS_IP(pip)->agstart, JFS_SBI(pip->i_sb)); dn_numag = JFS_SBI(pip->i_sb)->bmap->db_numag; - if (agno < 0 || agno > dn_numag) + if (agno < 0 || agno > dn_numag || agno >= MAXAG) return -EIO; if (atomic_read(&JFS_SBI(pip->i_sb)->bmap->db_active[agno])) { |