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: <2024073111-probe-endanger-cc8c@gregkh>
Date: Wed, 31 Jul 2024 12:25:43 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>, stsp <stsp2@...dex.ru>,
	linux-serial@...r.kernel.org,
	Linux kernel <linux-kernel@...r.kernel.org>,
	Johan Hovold <johan@...nel.org>
Subject: Re: [regression] ENOTTY returned for tty fds

On Wed, Jul 24, 2024 at 06:58:22PM +0800, Herbert Xu wrote:
> On Wed, Jul 24, 2024 at 06:53:00PM +0800, Herbert Xu wrote:
> > On Wed, Jul 24, 2024 at 12:15:39PM +0200, Greg KH wrote:
> > >
> > > -ENOTTY is the documented result of invalid ioctl arguments sent, I am
> > > pretty sure POSIX requires this somewhere.  So this was fixing a
> > > requirement here...
> > 
> > POSIX does not specify this at all:
> > 
> > https://pubs.opengroup.org/onlinepubs/9699919799/functions/ioctl.html
> 
> In fact it says:
> 
> If an underlying device driver detects an error, then ioctl() shall fail if:
> 
> [EINVAL]
> The request or arg argument is not valid for this device.
> 
> [ENOTTY]
> The file associated with the fildes argument is not a STREAMS device that accepts control functions.
> 
> Of course this is all moot since POSIX only specifies ioctl(2)
> for STREAMS devices, but this patch in question is literally
> going against the woring here.

That's going to be going against a lot of existing kernel code then.
-ENOTTY is the default action of almost all ioctl handlers when the
command is not a valid one, sorry.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ