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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250506180630.148c6ada@kernel.org>
Date: Tue, 6 May 2025 18:06:30 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Matt Johnston <matt@...econstruct.com.au>
Cc: Jeremy Kerr <jk@...econstruct.com.au>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
 <pabeni@...hat.com>, Simon Horman <horms@...nel.org>,
 netdev@...r.kernel.org,
 syzbot+e76d52dadc089b9d197f@...kaller.appspotmail.com,
 syzbot+1065a199625a388fce60@...kaller.appspotmail.com
Subject: Re: [PATCH net] net: mctp: Don't access ifa_index when missing

On Mon, 05 May 2025 17:05:12 +0800 Matt Johnston wrote:
> +		/* Userspace programs providing AF_MCTP must be expecting ifa_index filter
> +		 * behaviour, as will those setting strict_check.
> +		 */
> +		if (hdr->ifa_family == AF_MCTP || cb->strict_check)
> +			ifindex = hdr->ifa_index;

The use of cb->strict_check is a bit strange here. I could be wrong but
I though cb->strict_check should only impact validation. Not be used
for changing behavior.

If you have a reason to believe all user space passes a valid header -
how about we just return an error if message is too short?
IPv4 and IPv6 seem to return an error if message is short and
cb->strict_check, so they are more strict. MCTP doesn't have a ton of
legacy user space, we don't have to be lenient at all. My intuition
would be to always act like IP acts under cb->strict_check

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ