From: Greg Kroah-Hartman Date: Sun, 2 Nov 2025 12:36:53 +0000 (+0900) Subject: 6.12-stable patches X-Git-Tag: v6.6.116~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ed3ee826e5af0ec1b0a420b544cdfb046f384995;p=thirdparty%2Fkernel%2Fstable-queue.git 6.12-stable patches added patches: btrfs-tree-checker-fix-bounds-check-in-check_inode_extref.patch --- diff --git a/queue-6.12/btrfs-tree-checker-fix-bounds-check-in-check_inode_extref.patch b/queue-6.12/btrfs-tree-checker-fix-bounds-check-in-check_inode_extref.patch new file mode 100644 index 0000000000..273fa4341f --- /dev/null +++ b/queue-6.12/btrfs-tree-checker-fix-bounds-check-in-check_inode_extref.patch @@ -0,0 +1,33 @@ +From e92c2941204de7b62e9c2deecfeb9eaefe54a22a Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Wed, 8 Oct 2025 18:08:58 +0300 +Subject: btrfs: tree-checker: fix bounds check in check_inode_extref() + +From: Dan Carpenter + +commit e92c2941204de7b62e9c2deecfeb9eaefe54a22a upstream. + +The parentheses for the unlikely() annotation were put in the wrong +place so it means that the condition is basically never true and the +bounds checking is skipped. + +Fixes: aab9458b9f00 ("btrfs: tree-checker: add inode extref checks") +Signed-off-by: Dan Carpenter +Reviewed-by: Qu Wenruo +Signed-off-by: David Sterba +Signed-off-by: Greg Kroah-Hartman +--- + fs/btrfs/tree-checker.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/btrfs/tree-checker.c ++++ b/fs/btrfs/tree-checker.c +@@ -1785,7 +1785,7 @@ static int check_inode_extref(struct ext + struct btrfs_inode_extref *extref = (struct btrfs_inode_extref *)ptr; + u16 namelen; + +- if (unlikely(ptr + sizeof(*extref)) > end) { ++ if (unlikely(ptr + sizeof(*extref) > end)) { + inode_ref_err(leaf, slot, + "inode extref overflow, ptr %lu end %lu inode_extref size %zu", + ptr, end, sizeof(*extref)); diff --git a/queue-6.12/series b/queue-6.12/series index 6f93bd1c32..f39a511377 100644 --- a/queue-6.12/series +++ b/queue-6.12/series @@ -38,3 +38,4 @@ iommu-vt-d-avoid-use-of-null-after-warn_on_once.patch wifi-ath12k-fix-read-pointer-after-free-in-ath12k_mac_assign_vif_to_vdev.patch udmabuf-fix-a-buf-size-overflow-issue-during-udmabuf-creation.patch sfc-fix-null-dereferences-in-ef100_process_design_param.patch +btrfs-tree-checker-fix-bounds-check-in-check_inode_extref.patch