* [PATCH net-next] tun: fix group permission check
@ 2024-11-17 9:05 Stas Sergeev
2024-11-17 15:04 ` Willem de Bruijn
0 siblings, 1 reply; 16+ messages in thread
From: Stas Sergeev @ 2024-11-17 9:05 UTC (permalink / raw)
To: linux-kernel
Cc: Stas Sergeev, Willem de Bruijn, Jason Wang, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
netdev
Currently tun checks the group permission even if the user have matched.
Besides going against the usual permission semantic, this has a
very interesting implication: if the tun group is not among the
supplementary groups of the tun user, then effectively no one can
access the tun device. CAP_SYS_ADMIN still can, but its the same as
not setting the tun ownership.
This patch relaxes the group checking so that either the user match
or the group match is enough. This avoids the situation when no one
can access the device even though the ownership is properly set.
Also I simplified the logic by removing the redundant inversions:
tun_not_capable() --> !tun_capable()
Signed-off-by: Stas Sergeev <stsp2@yandex.ru>
CC: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
CC: Jason Wang <jasowang@redhat.com>
CC: Andrew Lunn <andrew+netdev@lunn.ch>
CC: "David S. Miller" <davem@davemloft.net>
CC: Eric Dumazet <edumazet@google.com>
CC: Jakub Kicinski <kuba@kernel.org>
CC: Paolo Abeni <pabeni@redhat.com>
CC: netdev@vger.kernel.org
CC: linux-kernel@vger.kernel.org
---
drivers/net/tun.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 9a0f6eb32016..d35b6a48d138 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -574,14 +574,18 @@ static u16 tun_select_queue(struct net_device *dev, struct sk_buff *skb,
return ret;
}
-static inline bool tun_not_capable(struct tun_struct *tun)
+static inline bool tun_capable(struct tun_struct *tun)
{
const struct cred *cred = current_cred();
struct net *net = dev_net(tun->dev);
- return ((uid_valid(tun->owner) && !uid_eq(cred->euid, tun->owner)) ||
- (gid_valid(tun->group) && !in_egroup_p(tun->group))) &&
- !ns_capable(net->user_ns, CAP_NET_ADMIN);
+ if (ns_capable(net->user_ns, CAP_NET_ADMIN))
+ return 1;
+ if (uid_valid(tun->owner) && uid_eq(cred->euid, tun->owner))
+ return 1;
+ if (gid_valid(tun->group) && in_egroup_p(tun->group))
+ return 1;
+ return 0;
}
static void tun_set_real_num_queues(struct tun_struct *tun)
@@ -2778,7 +2782,7 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
!!(tun->flags & IFF_MULTI_QUEUE))
return -EINVAL;
- if (tun_not_capable(tun))
+ if (!tun_capable(tun))
return -EPERM;
err = security_tun_dev_open(tun->security);
if (err < 0)
--
2.47.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH net-next] tun: fix group permission check
2024-11-17 9:05 Stas Sergeev
@ 2024-11-17 15:04 ` Willem de Bruijn
2024-11-18 21:40 ` Willem de Bruijn
2024-11-19 9:42 ` stsp
0 siblings, 2 replies; 16+ messages in thread
From: Willem de Bruijn @ 2024-11-17 15:04 UTC (permalink / raw)
To: Stas Sergeev, linux-kernel
Cc: Stas Sergeev, Willem de Bruijn, Jason Wang, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
netdev, agx, jdike
Stas Sergeev wrote:
> Currently tun checks the group permission even if the user have matched.
> Besides going against the usual permission semantic, this has a
> very interesting implication: if the tun group is not among the
> supplementary groups of the tun user, then effectively no one can
> access the tun device. CAP_SYS_ADMIN still can, but its the same as
> not setting the tun ownership.
>
> This patch relaxes the group checking so that either the user match
> or the group match is enough. This avoids the situation when no one
> can access the device even though the ownership is properly set.
>
> Also I simplified the logic by removing the redundant inversions:
> tun_not_capable() --> !tun_capable()
>
> Signed-off-by: Stas Sergeev <stsp2@yandex.ru>
This behavior goes back through many patches to commit 8c644623fe7e:
[NET]: Allow group ownership of TUN/TAP devices.
Introduce a new syscall TUNSETGROUP for group ownership setting of tap
devices. The user now is allowed to send packages if either his euid or
his egid matches the one specified via tunctl (via -u or -g
respecitvely). If both, gid and uid, are set via tunctl, both have to
match.
The choice evidently was on purpose. Even if indeed non-standard.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH net-next] tun: fix group permission check
2024-11-17 15:04 ` Willem de Bruijn
@ 2024-11-18 21:40 ` Willem de Bruijn
2024-11-19 10:51 ` Paolo Abeni
2024-11-19 9:42 ` stsp
1 sibling, 1 reply; 16+ messages in thread
From: Willem de Bruijn @ 2024-11-18 21:40 UTC (permalink / raw)
To: Willem de Bruijn, Stas Sergeev, linux-kernel
Cc: Stas Sergeev, Willem de Bruijn, Jason Wang, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
netdev, agx, jdike
Willem de Bruijn wrote:
> Stas Sergeev wrote:
> > Currently tun checks the group permission even if the user have matched.
> > Besides going against the usual permission semantic, this has a
> > very interesting implication: if the tun group is not among the
> > supplementary groups of the tun user, then effectively no one can
> > access the tun device. CAP_SYS_ADMIN still can, but its the same as
> > not setting the tun ownership.
> >
> > This patch relaxes the group checking so that either the user match
> > or the group match is enough. This avoids the situation when no one
> > can access the device even though the ownership is properly set.
> >
> > Also I simplified the logic by removing the redundant inversions:
> > tun_not_capable() --> !tun_capable()
> >
> > Signed-off-by: Stas Sergeev <stsp2@yandex.ru>
>
> This behavior goes back through many patches to commit 8c644623fe7e:
>
> [NET]: Allow group ownership of TUN/TAP devices.
>
> Introduce a new syscall TUNSETGROUP for group ownership setting of tap
> devices. The user now is allowed to send packages if either his euid or
> his egid matches the one specified via tunctl (via -u or -g
> respecitvely). If both, gid and uid, are set via tunctl, both have to
> match.
>
> The choice evidently was on purpose. Even if indeed non-standard.
I should clarify that I'm not against bringing this file in line with
normal user/group behavior.
Just want to give anyone a chance to speak up if they disagree and/or
recall why the code was originally written as it is.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH net-next] tun: fix group permission check
2024-11-17 15:04 ` Willem de Bruijn
2024-11-18 21:40 ` Willem de Bruijn
@ 2024-11-19 9:42 ` stsp
2024-11-19 14:56 ` Willem de Bruijn
1 sibling, 1 reply; 16+ messages in thread
From: stsp @ 2024-11-19 9:42 UTC (permalink / raw)
To: Willem de Bruijn, linux-kernel
Cc: Jason Wang, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, netdev, agx, jdike, Guido Guenther
17.11.2024 18:04, Willem de Bruijn пишет:
> Stas Sergeev wrote:
>> Currently tun checks the group permission even if the user have matched.
>> Besides going against the usual permission semantic, this has a
>> very interesting implication: if the tun group is not among the
>> supplementary groups of the tun user, then effectively no one can
>> access the tun device. CAP_SYS_ADMIN still can, but its the same as
>> not setting the tun ownership.
>>
>> This patch relaxes the group checking so that either the user match
>> or the group match is enough. This avoids the situation when no one
>> can access the device even though the ownership is properly set.
>>
>> Also I simplified the logic by removing the redundant inversions:
>> tun_not_capable() --> !tun_capable()
>>
>> Signed-off-by: Stas Sergeev <stsp2@yandex.ru>
> This behavior goes back through many patches to commit 8c644623fe7e:
>
> [NET]: Allow group ownership of TUN/TAP devices.
>
> Introduce a new syscall TUNSETGROUP for group ownership setting of tap
> devices. The user now is allowed to send packages if either his euid or
> his egid matches the one specified via tunctl (via -u or -g
> respecitvely). If both, gid and uid, are set via tunctl, both have to
> match.
>
> The choice evidently was on purpose. Even if indeed non-standard.
So what would you suggest?
Added Guido Guenther <agx@sigxcpu.org> to CC
for an opinion.
The main problem here is that by
setting user and group properly, you
end up with device inaccessible by
anyone, unless the user belongs to
the tun group. I don't think someone
wants to set up inaccessible devices,
so this property doesn't seem useful.
OTOH if the user does have that group
in his list, then, AFAICT, adding such
group to tun changes nothing: neither
limits nor extends the scope.
If you had group already set and you
set also user, then you limit the scope,
but its the same as just setting user alone.
So I really can't think of any valid usage
scenario of setting both tun user and tun
group.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH net-next] tun: fix group permission check
2024-11-18 21:40 ` Willem de Bruijn
@ 2024-11-19 10:51 ` Paolo Abeni
2024-11-19 10:54 ` stsp
0 siblings, 1 reply; 16+ messages in thread
From: Paolo Abeni @ 2024-11-19 10:51 UTC (permalink / raw)
To: Willem de Bruijn, Stas Sergeev, linux-kernel
Cc: Jason Wang, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, netdev, agx, jdike
On 11/18/24 22:40, Willem de Bruijn wrote:
> Willem de Bruijn wrote:
>> Stas Sergeev wrote:
>>> Currently tun checks the group permission even if the user have matched.
>>> Besides going against the usual permission semantic, this has a
>>> very interesting implication: if the tun group is not among the
>>> supplementary groups of the tun user, then effectively no one can
>>> access the tun device. CAP_SYS_ADMIN still can, but its the same as
>>> not setting the tun ownership.
>>>
>>> This patch relaxes the group checking so that either the user match
>>> or the group match is enough. This avoids the situation when no one
>>> can access the device even though the ownership is properly set.
>>>
>>> Also I simplified the logic by removing the redundant inversions:
>>> tun_not_capable() --> !tun_capable()
>>>
>>> Signed-off-by: Stas Sergeev <stsp2@yandex.ru>
>>
>> This behavior goes back through many patches to commit 8c644623fe7e:
>>
>> [NET]: Allow group ownership of TUN/TAP devices.
>>
>> Introduce a new syscall TUNSETGROUP for group ownership setting of tap
>> devices. The user now is allowed to send packages if either his euid or
>> his egid matches the one specified via tunctl (via -u or -g
>> respecitvely). If both, gid and uid, are set via tunctl, both have to
>> match.
>>
>> The choice evidently was on purpose. Even if indeed non-standard.
>
> I should clarify that I'm not against bringing this file in line with
> normal user/group behavior.
>
> Just want to give anyone a chance to speak up if they disagree and/or
> recall why the code was originally written as it is.
I think we can't accept a behaviour changing patch this late in the
cycle. If an agreement is reached it should be reposted after the merge
window.
/P
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH net-next] tun: fix group permission check
2024-11-19 10:51 ` Paolo Abeni
@ 2024-11-19 10:54 ` stsp
0 siblings, 0 replies; 16+ messages in thread
From: stsp @ 2024-11-19 10:54 UTC (permalink / raw)
To: Paolo Abeni, Willem de Bruijn, linux-kernel
Cc: Jason Wang, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, netdev, agx, jdike
19.11.2024 13:51, Paolo Abeni пишет:
> I think we can't accept a behaviour changing patch this late in the
> cycle. If an agreement is reached it should be reposted after the merge
> window.
>
> /P
Noted, thanks.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH net-next] tun: fix group permission check
2024-11-19 9:42 ` stsp
@ 2024-11-19 14:56 ` Willem de Bruijn
0 siblings, 0 replies; 16+ messages in thread
From: Willem de Bruijn @ 2024-11-19 14:56 UTC (permalink / raw)
To: stsp, Willem de Bruijn, linux-kernel
Cc: Jason Wang, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, netdev, agx, jdike, Guido Guenther
stsp wrote:
> 17.11.2024 18:04, Willem de Bruijn пишет:
> > Stas Sergeev wrote:
> >> Currently tun checks the group permission even if the user have matched.
> >> Besides going against the usual permission semantic, this has a
> >> very interesting implication: if the tun group is not among the
> >> supplementary groups of the tun user, then effectively no one can
> >> access the tun device. CAP_SYS_ADMIN still can, but its the same as
> >> not setting the tun ownership.
> >>
> >> This patch relaxes the group checking so that either the user match
> >> or the group match is enough. This avoids the situation when no one
> >> can access the device even though the ownership is properly set.
> >>
> >> Also I simplified the logic by removing the redundant inversions:
> >> tun_not_capable() --> !tun_capable()
> >>
> >> Signed-off-by: Stas Sergeev <stsp2@yandex.ru>
> > This behavior goes back through many patches to commit 8c644623fe7e:
> >
> > [NET]: Allow group ownership of TUN/TAP devices.
> >
> > Introduce a new syscall TUNSETGROUP for group ownership setting of tap
> > devices. The user now is allowed to send packages if either his euid or
> > his egid matches the one specified via tunctl (via -u or -g
> > respecitvely). If both, gid and uid, are set via tunctl, both have to
> > match.
> >
> > The choice evidently was on purpose. Even if indeed non-standard.
>
> So what would you suggest?
> Added Guido Guenther <agx@sigxcpu.org> to CC
> for an opinion.
> The main problem here is that by
> setting user and group properly, you
> end up with device inaccessible by
> anyone, unless the user belongs to
> the tun group. I don't think someone
> wants to set up inaccessible devices,
> so this property doesn't seem useful.
> OTOH if the user does have that group
> in his list, then, AFAICT, adding such
> group to tun changes nothing: neither
> limits nor extends the scope.
> If you had group already set and you
> set also user, then you limit the scope,
> but its the same as just setting user alone.
> So I really can't think of any valid usage
> scenario of setting both tun user and tun
> group.
Understood. If no one comments before the window reopens, I think it's
fine to just resubmit.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH net-next] tun: fix group permission check
@ 2024-12-05 7:36 Stas Sergeev
2024-12-05 16:50 ` Willem de Bruijn
` (2 more replies)
0 siblings, 3 replies; 16+ messages in thread
From: Stas Sergeev @ 2024-12-05 7:36 UTC (permalink / raw)
To: netdev
Cc: Stas Sergeev, Willem de Bruijn, Jason Wang, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
linux-kernel
Currently tun checks the group permission even if the user have matched.
Besides going against the usual permission semantic, this has a
very interesting implication: if the tun group is not among the
supplementary groups of the tun user, then effectively no one can
access the tun device. CAP_SYS_ADMIN still can, but its the same as
not setting the tun ownership.
This patch relaxes the group checking so that either the user match
or the group match is enough. This avoids the situation when no one
can access the device even though the ownership is properly set.
Also I simplified the logic by removing the redundant inversions:
tun_not_capable() --> !tun_capable()
Signed-off-by: Stas Sergeev <stsp2@yandex.ru>
CC: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
CC: Jason Wang <jasowang@redhat.com>
CC: Andrew Lunn <andrew+netdev@lunn.ch>
CC: "David S. Miller" <davem@davemloft.net>
CC: Eric Dumazet <edumazet@google.com>
CC: Jakub Kicinski <kuba@kernel.org>
CC: Paolo Abeni <pabeni@redhat.com>
CC: netdev@vger.kernel.org
CC: linux-kernel@vger.kernel.org
---
drivers/net/tun.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 9a0f6eb32016..d35b6a48d138 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -574,14 +574,18 @@ static u16 tun_select_queue(struct net_device *dev, struct sk_buff *skb,
return ret;
}
-static inline bool tun_not_capable(struct tun_struct *tun)
+static inline bool tun_capable(struct tun_struct *tun)
{
const struct cred *cred = current_cred();
struct net *net = dev_net(tun->dev);
- return ((uid_valid(tun->owner) && !uid_eq(cred->euid, tun->owner)) ||
- (gid_valid(tun->group) && !in_egroup_p(tun->group))) &&
- !ns_capable(net->user_ns, CAP_NET_ADMIN);
+ if (ns_capable(net->user_ns, CAP_NET_ADMIN))
+ return 1;
+ if (uid_valid(tun->owner) && uid_eq(cred->euid, tun->owner))
+ return 1;
+ if (gid_valid(tun->group) && in_egroup_p(tun->group))
+ return 1;
+ return 0;
}
static void tun_set_real_num_queues(struct tun_struct *tun)
@@ -2778,7 +2782,7 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
!!(tun->flags & IFF_MULTI_QUEUE))
return -EINVAL;
- if (tun_not_capable(tun))
+ if (!tun_capable(tun))
return -EPERM;
err = security_tun_dev_open(tun->security);
if (err < 0)
--
2.47.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH net-next] tun: fix group permission check
2024-12-05 7:36 [PATCH net-next] tun: fix group permission check Stas Sergeev
@ 2024-12-05 16:50 ` Willem de Bruijn
2024-12-06 2:42 ` Jason Wang
2024-12-08 1:44 ` Jakub Kicinski
2024-12-08 1:50 ` patchwork-bot+netdevbpf
2 siblings, 1 reply; 16+ messages in thread
From: Willem de Bruijn @ 2024-12-05 16:50 UTC (permalink / raw)
To: Stas Sergeev, netdev
Cc: Stas Sergeev, Willem de Bruijn, Jason Wang, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
linux-kernel
Stas Sergeev wrote:
> Currently tun checks the group permission even if the user have matched.
> Besides going against the usual permission semantic, this has a
> very interesting implication: if the tun group is not among the
> supplementary groups of the tun user, then effectively no one can
> access the tun device. CAP_SYS_ADMIN still can, but its the same as
> not setting the tun ownership.
>
> This patch relaxes the group checking so that either the user match
> or the group match is enough. This avoids the situation when no one
> can access the device even though the ownership is properly set.
>
> Also I simplified the logic by removing the redundant inversions:
> tun_not_capable() --> !tun_capable()
>
> Signed-off-by: Stas Sergeev <stsp2@yandex.ru>
>
> CC: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
> CC: Jason Wang <jasowang@redhat.com>
> CC: Andrew Lunn <andrew+netdev@lunn.ch>
> CC: "David S. Miller" <davem@davemloft.net>
> CC: Eric Dumazet <edumazet@google.com>
> CC: Jakub Kicinski <kuba@kernel.org>
> CC: Paolo Abeni <pabeni@redhat.com>
> CC: netdev@vger.kernel.org
> CC: linux-kernel@vger.kernel.org
Reviewed-by: Willem de Bruijn <willemb@google.com>
A lot more readable this way too.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH net-next] tun: fix group permission check
2024-12-05 16:50 ` Willem de Bruijn
@ 2024-12-06 2:42 ` Jason Wang
0 siblings, 0 replies; 16+ messages in thread
From: Jason Wang @ 2024-12-06 2:42 UTC (permalink / raw)
To: Willem de Bruijn
Cc: Stas Sergeev, netdev, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, linux-kernel
On Fri, Dec 6, 2024 at 12:50 AM Willem de Bruijn
<willemdebruijn.kernel@gmail.com> wrote:
>
> Stas Sergeev wrote:
> > Currently tun checks the group permission even if the user have matched.
> > Besides going against the usual permission semantic, this has a
> > very interesting implication: if the tun group is not among the
> > supplementary groups of the tun user, then effectively no one can
> > access the tun device. CAP_SYS_ADMIN still can, but its the same as
> > not setting the tun ownership.
> >
> > This patch relaxes the group checking so that either the user match
> > or the group match is enough. This avoids the situation when no one
> > can access the device even though the ownership is properly set.
> >
> > Also I simplified the logic by removing the redundant inversions:
> > tun_not_capable() --> !tun_capable()
> >
> > Signed-off-by: Stas Sergeev <stsp2@yandex.ru>
> >
> > CC: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
> > CC: Jason Wang <jasowang@redhat.com>
> > CC: Andrew Lunn <andrew+netdev@lunn.ch>
> > CC: "David S. Miller" <davem@davemloft.net>
> > CC: Eric Dumazet <edumazet@google.com>
> > CC: Jakub Kicinski <kuba@kernel.org>
> > CC: Paolo Abeni <pabeni@redhat.com>
> > CC: netdev@vger.kernel.org
> > CC: linux-kernel@vger.kernel.org
>
> Reviewed-by: Willem de Bruijn <willemb@google.com>
>
> A lot more readable this way too.
>
Acked-by: Jason Wang <jasowang@redhat.com>
Thanks
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH net-next] tun: fix group permission check
2024-12-05 7:36 [PATCH net-next] tun: fix group permission check Stas Sergeev
2024-12-05 16:50 ` Willem de Bruijn
@ 2024-12-08 1:44 ` Jakub Kicinski
2024-12-08 1:44 ` Jakub Kicinski
2024-12-08 6:53 ` stsp
2024-12-08 1:50 ` patchwork-bot+netdevbpf
2 siblings, 2 replies; 16+ messages in thread
From: Jakub Kicinski @ 2024-12-08 1:44 UTC (permalink / raw)
To: Stas Sergeev
Cc: netdev, Willem de Bruijn, Jason Wang, Andrew Lunn,
David S. Miller, Eric Dumazet, Paolo Abeni, linux-kernel
On Thu, 5 Dec 2024 10:36:14 +0300 Stas Sergeev wrote:
> Signed-off-by: Stas Sergeev <stsp2@yandex.ru>
>
> CC: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Please avoid empty lines in the future.
I personally put a --- line between SOB and the CCs.
That way git am discards the CCs when patch is applied.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH net-next] tun: fix group permission check
2024-12-08 1:44 ` Jakub Kicinski
@ 2024-12-08 1:44 ` Jakub Kicinski
2024-12-08 6:53 ` stsp
1 sibling, 0 replies; 16+ messages in thread
From: Jakub Kicinski @ 2024-12-08 1:44 UTC (permalink / raw)
To: Stas Sergeev
Cc: netdev, Willem de Bruijn, Jason Wang, Andrew Lunn,
David S. Miller, Eric Dumazet, Paolo Abeni, linux-kernel
On Sat, 7 Dec 2024 17:44:00 -0800 Jakub Kicinski wrote:
> On Thu, 5 Dec 2024 10:36:14 +0300 Stas Sergeev wrote:
> > Signed-off-by: Stas Sergeev <stsp2@yandex.ru>
> >
> > CC: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
>
> Please avoid empty lines in the future.
I mean empty lines between tags, to be clear
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH net-next] tun: fix group permission check
2024-12-05 7:36 [PATCH net-next] tun: fix group permission check Stas Sergeev
2024-12-05 16:50 ` Willem de Bruijn
2024-12-08 1:44 ` Jakub Kicinski
@ 2024-12-08 1:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 16+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-12-08 1:50 UTC (permalink / raw)
To: Stas Sergeev
Cc: netdev, willemdebruijn.kernel, jasowang, andrew+netdev, davem,
edumazet, kuba, pabeni, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 5 Dec 2024 10:36:14 +0300 you wrote:
> Currently tun checks the group permission even if the user have matched.
> Besides going against the usual permission semantic, this has a
> very interesting implication: if the tun group is not among the
> supplementary groups of the tun user, then effectively no one can
> access the tun device. CAP_SYS_ADMIN still can, but its the same as
> not setting the tun ownership.
>
> [...]
Here is the summary with links:
- [net-next] tun: fix group permission check
https://git.kernel.org/netdev/net-next/c/3ca459eaba1b
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH net-next] tun: fix group permission check
2024-12-08 1:44 ` Jakub Kicinski
2024-12-08 1:44 ` Jakub Kicinski
@ 2024-12-08 6:53 ` stsp
2024-12-09 21:44 ` Jakub Kicinski
1 sibling, 1 reply; 16+ messages in thread
From: stsp @ 2024-12-08 6:53 UTC (permalink / raw)
To: Jakub Kicinski
Cc: netdev, Willem de Bruijn, Jason Wang, Andrew Lunn,
David S. Miller, Eric Dumazet, Paolo Abeni, linux-kernel
08.12.2024 04:44, Jakub Kicinski пишет:
> On Thu, 5 Dec 2024 10:36:14 +0300 Stas Sergeev wrote:
>> Signed-off-by: Stas Sergeev <stsp2@yandex.ru>
>>
>> CC: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
> Please avoid empty lines in the future.
Ok.
> I personally put a --- line between SOB and the CCs.
> That way git am discards the CCs when patch is applied.
>
I simply used the output of
get_maintainer.pl and copy/pasted
it directly to commit msg.
After doing so, git format-patch
would put --- after CCs.
How to do that properly?
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH net-next] tun: fix group permission check
2024-12-08 6:53 ` stsp
@ 2024-12-09 21:44 ` Jakub Kicinski
2024-12-09 21:53 ` stsp
0 siblings, 1 reply; 16+ messages in thread
From: Jakub Kicinski @ 2024-12-09 21:44 UTC (permalink / raw)
To: stsp
Cc: netdev, Willem de Bruijn, Jason Wang, Andrew Lunn,
David S. Miller, Eric Dumazet, Paolo Abeni, linux-kernel
On Sun, 8 Dec 2024 09:53:40 +0300 stsp wrote:
> > I personally put a --- line between SOB and the CCs.
> > That way git am discards the CCs when patch is applied.
> >
> I simply used the output of
> get_maintainer.pl and copy/pasted
> it directly to commit msg.
> After doing so, git format-patch
> would put --- after CCs.
> How to do that properly?
You can have multiple --- markers, you can insert your marker and let
git format-patch add another.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH net-next] tun: fix group permission check
2024-12-09 21:44 ` Jakub Kicinski
@ 2024-12-09 21:53 ` stsp
0 siblings, 0 replies; 16+ messages in thread
From: stsp @ 2024-12-09 21:53 UTC (permalink / raw)
To: Jakub Kicinski
Cc: netdev, Willem de Bruijn, Jason Wang, Andrew Lunn,
David S. Miller, Eric Dumazet, Paolo Abeni, linux-kernel
10.12.2024 00:44, Jakub Kicinski пишет:
> On Sun, 8 Dec 2024 09:53:40 +0300 stsp wrote:
>>> I personally put a --- line between SOB and the CCs.
>>> That way git am discards the CCs when patch is applied.
>>>
>> I simply used the output of
>> get_maintainer.pl and copy/pasted
>> it directly to commit msg.
>> After doing so, git format-patch
>> would put --- after CCs.
>> How to do that properly?
> You can have multiple --- markers, you can insert your marker and let
> git format-patch add another.
Thank you.
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2024-12-09 21:59 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-05 7:36 [PATCH net-next] tun: fix group permission check Stas Sergeev
2024-12-05 16:50 ` Willem de Bruijn
2024-12-06 2:42 ` Jason Wang
2024-12-08 1:44 ` Jakub Kicinski
2024-12-08 1:44 ` Jakub Kicinski
2024-12-08 6:53 ` stsp
2024-12-09 21:44 ` Jakub Kicinski
2024-12-09 21:53 ` stsp
2024-12-08 1:50 ` patchwork-bot+netdevbpf
-- strict thread matches above, loose matches on Subject: below --
2024-11-17 9:05 Stas Sergeev
2024-11-17 15:04 ` Willem de Bruijn
2024-11-18 21:40 ` Willem de Bruijn
2024-11-19 10:51 ` Paolo Abeni
2024-11-19 10:54 ` stsp
2024-11-19 9:42 ` stsp
2024-11-19 14:56 ` Willem de Bruijn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).