diff options
| author | Taegu Ha <hataegu0826@gmail.com> | 2026-04-09 16:11:15 +0900 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-04-12 13:47:45 -0700 |
| commit | 2bb6379416fd19f44c3423a00bfd8626259f6067 (patch) | |
| tree | 9a3f75797c61eaeb43ae849ede2542430bc14609 /tools/tracing/rtla/example/git@git.tavy.me:linux.git | |
| parent | e802cd8cb0ffc4ddd2d6f78fc970d195af33deda (diff) | |
ppp: require CAP_NET_ADMIN in target netns for unattached ioctls
/dev/ppp open is currently authorized against file->f_cred->user_ns,
while unattached administrative ioctls operate on current->nsproxy->net_ns.
As a result, a local unprivileged user can create a new user namespace
with CLONE_NEWUSER, gain CAP_NET_ADMIN only in that new user namespace,
and still issue PPPIOCNEWUNIT, PPPIOCATTACH, or PPPIOCATTCHAN against
an inherited network namespace.
Require CAP_NET_ADMIN in the user namespace that owns the target network
namespace before handling unattached PPP administrative ioctls.
This preserves normal pppd operation in the network namespace it is
actually privileged in, while rejecting the userns-only inherited-netns
case.
Fixes: 273ec51dd7ce ("net: ppp_generic - introduce net-namespace functionality v2")
Signed-off-by: Taegu Ha <hataegu0826@gmail.com>
Link: https://patch.msgid.link/20260409071117.4354-1-hataegu0826@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/tracing/rtla/example/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
