LKML Archive on
help / color / mirror / Atom feed
To: Peter Collingbourne <>
Subject: Re: [PATCH v2] net: don't unconditionally copy_from_user a struct ifreq for socket ioctls
Date: Fri, 27 Aug 2021 08:50:06 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>


This patch was applied to netdev/net.git (refs/heads/master):

On Thu, 26 Aug 2021 12:46:01 -0700 you wrote:
> A common implementation of isatty(3) involves calling a ioctl passing
> a dummy struct argument and checking whether the syscall failed --
> bionic and glibc use TCGETS (passing a struct termios), and musl uses
> TIOCGWINSZ (passing a struct winsize). If the FD is a socket, we will
> copy sizeof(struct ifreq) bytes of data from the argument and return
> -EFAULT if that fails. The result is that the isatty implementations
> may return a non-POSIX-compliant value in errno in the case where part
> of the dummy struct argument is inaccessible, as both struct termios
> and struct winsize are smaller than struct ifreq (at least on arm64).
> [...]

Here is the summary with links:
  - [v2] net: don't unconditionally copy_from_user a struct ifreq for socket ioctls

You are awesome, thank you!
Deet-doot-dot, I am a bot.

  reply	other threads:[~2021-08-27  8:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26 19:46 Peter Collingbourne
2021-08-27  8:50 ` patchwork-bot+netdevbpf [this message]
2021-08-31 16:30 ` Jakub Kicinski
2021-09-01  8:22   ` David Laight
2021-09-01 14:03     ` Jakub Kicinski
2021-09-01 18:01       ` Peter Collingbourne
2021-09-01 23:20         ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH v2] net: don'\''t unconditionally copy_from_user a struct ifreq for socket ioctls' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).