Skip to content

Commit 3f1adee

Browse files
committed
Merge: ext4: fix mb_cache_entry's e_refcnt leak in ext4_xattr_block_cache_find()
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/4601 JIRA: https://issues.redhat.com/browse/RHEL-45031 CVE: CVE-2024-39276 Signed-off-by: Pavel Reichl <preichl@redhat.com> Approved-by: Andrey Albershteyn <aalbersh@redhat.com> Approved-by: Bill O'Donnell <bodonnel@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Lucas Zampieri <lzampier@redhat.com>
2 parents a82634e + 56c422b commit 3f1adee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/ext4/xattr.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3113,8 +3113,10 @@ ext4_xattr_block_cache_find(struct inode *inode,
31133113

31143114
bh = ext4_sb_bread(inode->i_sb, ce->e_value, REQ_PRIO);
31153115
if (IS_ERR(bh)) {
3116-
if (PTR_ERR(bh) == -ENOMEM)
3116+
if (PTR_ERR(bh) == -ENOMEM) {
3117+
mb_cache_entry_put(ea_block_cache, ce);
31173118
return NULL;
3119+
}
31183120
bh = NULL;
31193121
EXT4_ERROR_INODE(inode, "block %lu read error",
31203122
(unsigned long)ce->e_value);

0 commit comments

Comments
 (0)