lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANn89iLdB8Tv0tuksqSmUYxivdr-zr8oC2L1BTKWBQXAgA7J+Q@mail.gmail.com>
Date: Fri, 23 Jan 2026 10:28:15 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Kery Qi <qikeyu2017@...il.com>
Cc: davem@...emloft.net, dsahern@...nel.org, kuba@...nel.org, 
	pabeni@...hat.com, horms@...nel.org, kaber@...sh.net, netdev@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ipv6: ip6mr: check socket type and protocol in
 ip6mr_ioctl and ip6mr_compat_ioctl

On Fri, Jan 23, 2026 at 2:15 AM Kery Qi <qikeyu2017@...il.com> wrote:
>
> commit 99253eb750fd ("ipv6: check sk sk_type and protocol early in
> ip_mroute_set/getsockopt") fixed the issue for ip6_mroute_setsockopt()
> and ip6_mroute_getsockopt() by checking socket type and protocol
> before accessing raw6_sk(sk)->ip6mr_table.
>
> However, ip6mr_ioctl() and ip6mr_compat_ioctl() were missed in that fix
> and have the same problem: they access raw6_sk(sk)->ip6mr_table without
> first verifying that the socket is a raw socket with IPPROTO_ICMPV6
> protocol.
>
> This allows a permission bypass where a user with CAP_NET_RAW can create
> a non-ICMPv6 raw socket (e.g., IPPROTO_UDP, IPPROTO_TCP, or any other
> protocol) and use SIOCGETMIFCNT_IN6 or SIOCGETSGCNT_IN6 ioctls to query
> IPv6 multicast routing statistics. This bypasses the access control that
> restricts mroute operations to ICMPv6 sockets only.
>
> For example, the following would succeed on a vulnerable kernel:
>
>     int fd = socket(AF_INET6, SOCK_RAW, IPPROTO_UDP);
>     struct sioc_mif_req6 req = { .mifi = 0 };
>     ioctl(fd, SIOCGETMIFCNT_IN6, &req);  // should fail with EOPNOTSUPP
>
> While the direct security impact is limited to information disclosure of
> multicast routing statistics, this violates the intended access control
> model where only ICMPv6 raw sockets should be able to access mroute
> functionalities.
>

Where has this been documented? An RFC perhaps ?

This change could break applications if they were unaware of such rules.

I fail to see how querying statistics could be a risk.

What about the RTNL_FAMILY_IPMR rtnetlink interface ? I am sure it is
available to any user.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ