Patch "net: bridge: fix ioctl old_deviceless bridge argument" has been added to the 5.15-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

    net: bridge: fix ioctl old_deviceless bridge argument

to the 5.15-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:
     net-bridge-fix-ioctl-old_deviceless-bridge-argument.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 29a91cd9787711f0c23d282876f34300f39c691d
Author: Remi Pommarel <repk@xxxxxxxxxxxx>
Date:   Thu Dec 23 16:31:38 2021 +0100

    net: bridge: fix ioctl old_deviceless bridge argument
    
    [ Upstream commit d95a56207c078e2019cf6659d890ec1e987e8420 ]
    
    Commit 561d8352818f ("bridge: use ndo_siocdevprivate") changed the
    source and destination arguments of copy_{to,from}_user in bridge's
    old_deviceless() from args[1] to uarg breaking SIOC{G,S}IFBR ioctls.
    
    Commit cbd7ad29a507 ("net: bridge: fix ioctl old_deviceless bridge
    argument") fixed only BRCTL_{ADD,DEL}_BRIDGES commands leaving
    BRCTL_GET_BRIDGES one untouched.
    
    The fixes BRCTL_GET_BRIDGES as well and has been tested with busybox's
    brctl.
    
    Example of broken brctl:
    $ brctl show
    bridge name     bridge id               STP enabled     interfaces
    brctl: can't get bridge name for index 0: No such device or address
    
    Example of fixed brctl:
    $ brctl show
    bridge name     bridge id               STP enabled     interfaces
    br0             8000.000000000000       no
    
    Fixes: 561d8352818f ("bridge: use ndo_siocdevprivate")
    Signed-off-by: Remi Pommarel <repk@xxxxxxxxxxxx>
    Reviewed-by: Arnd Bergmann <arnd@xxxxxxxx>
    Acked-by: Nikolay Aleksandrov <nikolay@xxxxxxxxxx>
    Link: https://lore.kernel.org/all/20211223153139.7661-2-repk@xxxxxxxxxxxx/
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c
index 49c268871fc11..9922497e59f8c 100644
--- a/net/bridge/br_ioctl.c
+++ b/net/bridge/br_ioctl.c
@@ -337,7 +337,7 @@ static int old_deviceless(struct net *net, void __user *uarg)
 
 		args[2] = get_bridge_ifindices(net, indices, args[2]);
 
-		ret = copy_to_user(uarg, indices,
+		ret = copy_to_user((void __user *)args[1], indices,
 				   array_size(args[2], sizeof(int)))
 			? -EFAULT : args[2];
 



[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