From: Kees Cook <keescook@chromium•org>
To: Eric Dumazet <edumazet@google•com>
Cc: "David S . Miller" <davem@davemloft•net>,
Jakub Kicinski <kuba@kernel•org>, Paolo Abeni <pabeni@redhat•com>,
netdev@vger•kernel.org, eric.dumazet@gmail•com
Subject: Re: [PATCH net-next] scm: add user copy checks to put_cmsg()
Date: Fri, 17 Feb 2023 17:41:21 -0800 [thread overview]
Message-ID: <63f02cc2.170a0220.5e28e.4a53@mx.google.com> (raw)
In-Reply-To: <20230217182454.2432057-1-edumazet@google.com>
On Fri, Feb 17, 2023 at 06:24:54PM +0000, Eric Dumazet wrote:
> This is a followup of commit 2558b8039d05 ("net: use a bounce
> buffer for copying skb->mark")
>
> x86 and powerpc define user_access_begin, meaning
> that they are not able to perform user copy checks
> when using user_write_access_begin() / unsafe_copy_to_user()
> and friends [1]
>
> Instead of waiting bugs to trigger on other arches,
> add a check_object_size() in put_cmsg() to make sure
> that new code tested on x86 with CONFIG_HARDENED_USERCOPY=y
> will perform more security checks.
>
> [1] We can not generically call check_object_size() from
> unsafe_copy_to_user() because UACCESS is enabled at this point.
>
> Signed-off-by: Eric Dumazet <edumazet@google•com>
Thanks!
Acked-by: Kees Cook <keescook@chromium•org>
--
Kees Cook
next prev parent reply other threads:[~2023-02-18 1:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 18:24 [PATCH net-next] scm: add user copy checks to put_cmsg() Eric Dumazet
2023-02-18 1:41 ` Kees Cook [this message]
2023-02-20 11:50 ` patchwork-bot+netdevbpf
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=63f02cc2.170a0220.5e28e.4a53@mx.google.com \
--to=keescook@chromium$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=eric.dumazet@gmail$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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