From: Lance Richardson <lance.richardson.net@gmail.com>
To: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, mingo@redhat.com
Subject: Re: [PATCH v2] fs: select/pselect buffer overrun with x32 abi
Date: Tue, 6 Mar 2018 13:07:04 -0500 [thread overview]
Message-ID: <20180306180704.5ctpvwit4yothv3f@Corsair> (raw)
In-Reply-To: <20180227153144.4629-1-lance.richardson.net@gmail.com>
On Tue, Feb 27, 2018 at 10:31:44AM -0500, Lance Richardson wrote:
> The definition of fd_set in X32 user-space uses a 32-bit base
> data type for the fd array while the kernel uses a 64-bit base
> data type. For applications using the glibc implementation of
> select(2)/pselect(2), the size of fd_set is an integer multiple
> of both base types, so there is no issue.
>
> For applications using fd_set sizes that are different from
> the glibc default size, an overrun of the user-space fd_set
> buffer will occur when the user-space buffer size is an odd
> multiple of 4 bytes (e.g. user-space can pass a 12-byte fd_set
> to the kernel and the kernel will copy 16 bytes to user-space
> before returning from select/pselect system calls). OpenSSH is
> one example of an application using fd_set sizes different from
> the default.
>
Please let me know if there is a more appropriate list for patches
in this area, or if there is a better list for x32 ABI issues.
Thanks,
Lance Richardson
prev parent reply other threads:[~2018-03-06 18:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-27 15:31 [PATCH v2] fs: select/pselect buffer overrun with x32 abi Lance Richardson
2018-03-06 18:07 ` Lance Richardson [this message]
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180306180704.5ctpvwit4yothv3f@Corsair \
--to=lance.richardson.net@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).