Patch "btrfs: fix 64bit compat send ioctl arguments not initializing version member" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    btrfs: fix 64bit compat send ioctl arguments not initializing version member

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     btrfs-fix-64bit-compat-send-ioctl-arguments-not-initializing-version-member.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 5de0434bc064606d6b7467ec3e5ad22963a18c04 Mon Sep 17 00:00:00 2001
From: David Sterba <dsterba@xxxxxxxx>
Date: Tue, 14 Nov 2023 17:44:11 +0100
Subject: btrfs: fix 64bit compat send ioctl arguments not initializing version member

From: David Sterba <dsterba@xxxxxxxx>

commit 5de0434bc064606d6b7467ec3e5ad22963a18c04 upstream.

When the send protocol versioning was added in 5.16 e77fbf990316
("btrfs: send: prepare for v2 protocol"), the 32/64bit compat code was
not updated (added by 2351f431f727 ("btrfs: fix send ioctl on 32bit with
64bit kernel")), missing the version struct member. The compat code is
probably rarely used, nobody reported any bugs.

Found by tool https://github.com/jirislaby/clang-struct .

Fixes: e77fbf990316 ("btrfs: send: prepare for v2 protocol")
CC: stable@xxxxxxxxxxxxxxx # 6.1+
Reviewed-by: Filipe Manana <fdmanana@xxxxxxxx>
Signed-off-by: David Sterba <dsterba@xxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 fs/btrfs/ioctl.c |    1 +
 1 file changed, 1 insertion(+)

--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -5236,6 +5236,7 @@ static int _btrfs_ioctl_send(struct inod
 		arg->clone_sources = compat_ptr(args32.clone_sources);
 		arg->parent_root = args32.parent_root;
 		arg->flags = args32.flags;
+		arg->version = args32.version;
 		memcpy(arg->reserved, args32.reserved,
 		       sizeof(args32.reserved));
 #else


Patches currently in stable-queue which might be from dsterba@xxxxxxxx are

queue-6.1/btrfs-add-dmesg-output-for-first-mount-and-last-unmount-of-a-filesystem.patch
queue-6.1/btrfs-ref-verify-fix-memory-leaks-in-btrfs_ref_tree_mod.patch
queue-6.1/btrfs-send-ensure-send_fd-is-writable.patch
queue-6.1/btrfs-fix-off-by-one-when-checking-chunk-map-includes-logical-address.patch
queue-6.1/btrfs-fix-64bit-compat-send-ioctl-arguments-not-initializing-version-member.patch
queue-6.1/btrfs-make-error-messages-more-clear-when-getting-a-chunk-map.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux