From: Nikolay Aleksandrov <nikolay@nvidia.com>
To: Remi Pommarel <repk@triplefau.lt>, <netdev@vger.kernel.org>
Cc: Roopa Prabhu <roopa@nvidia.com>, Arnd Bergmann <arnd@arndb.de>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
<bridge@lists.linux-foundation.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] net: bridge: fix ioctl old_deviceless bridge argument
Date: Thu, 23 Dec 2021 09:42:48 +0200 [thread overview]
Message-ID: <d4dc329f-ffcc-044f-01f7-5db2d0a69d92@nvidia.com> (raw)
In-Reply-To: <20211222191320.17662-1-repk@triplefau.lt>
On 22/12/2021 21:13, Remi Pommarel wrote:
> 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
>
> Fixes: 561d8352818f ("bridge: use ndo_siocdevprivate")
> Signed-off-by: Remi Pommarel <repk@triplefau.lt>
> ---
> net/bridge/br_ioctl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c
> index db4ab2c2ce18..891cfcf45644 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];
>
>
Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
next prev parent reply other threads:[~2021-12-23 7:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-22 19:13 [PATCH net] net: bridge: fix ioctl old_deviceless bridge argument Remi Pommarel
2021-12-22 21:52 ` Arnd Bergmann
2021-12-23 11:00 ` Remi Pommarel
2021-12-23 11:38 ` Arnd Bergmann
2021-12-23 13:33 ` Remi Pommarel
2021-12-23 7:42 ` Nikolay Aleksandrov [this message]
2021-12-23 18:10 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d4dc329f-ffcc-044f-01f7-5db2d0a69d92@nvidia.com \
--to=nikolay@nvidia.com \
--cc=arnd@arndb.de \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=repk@triplefau.lt \
--cc=roopa@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox