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: <CAKgT0Uf+XaKCFgBRTn-viVsKkNE7piAuDpht=efixsAV=3JdFQ@mail.gmail.com>
Date: Fri, 2 Jun 2023 11:02:23 -0700
From: Alexander Duyck <alexander.duyck@...il.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Ding Hui <dinghui@...gfor.com.cn>, davem@...emloft.net, edumazet@...gle.com, 
	kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org, 
	linux-kernel@...r.kernel.org, pengdonglin@...gfor.com.cn, 
	huangcun@...gfor.com.cn
Subject: Re: [PATCH net-next] net: ethtool: Fix out-of-bounds copy to user

On Fri, Jun 2, 2023 at 9:37 AM Andrew Lunn <andrew@...n.ch> wrote:
>
> > What this change is essentially doing is clamping the copied data to
> > the lesser of the current value versus the value when the userspace
> > was allocated. However I am wondering now if we shouldn't just update
> > the size value and return that as some sort of error for the userspace
> > to potentially reallocate and repeat until it has the right size.
>
> I'm not sure we should be putting any effort into the IOCTL
> interface. It is deprecated. We should fix overrun problems, but i
> would not change the API. Netlink handles this atomically, and that is
> the interface tools should be using, not this IOCTL.

If that is the case maybe it would just make more sense to just return
an error if we are at risk of overrunning the userspace allocated
buffer.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ