From: Richard Weinberger <richard@nod.at>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-hardening <linux-hardening@vger.kernel.org>,
netdev <netdev@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
"Kees Cook" <keescook@chromium.org>,
"Petr Mladek" <pmladek@suse.com>,
"Steven Rostedt" <rostedt@goodmis.org>,
senozhatsky <senozhatsky@chromium.org>,
"Rasmus Villemoes" <linux@rasmusvillemoes.dk>,
davem <davem@davemloft.net>, edumazet <edumazet@google.com>,
kuba <kuba@kernel.org>, pabeni <pabeni@redhat.com>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Wedson Almeida Filho" <wedsonaf@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Alexei Starovoitov" <ast@kernel.org>,
"Daniel Borkmann" <daniel@iogearbox.net>,
"Jesper Dangaard Brouer" <hawk@kernel.org>,
"John Fastabend" <john.fastabend@gmail.com>
Subject: Re: [RFC PATCH 1/1] vsprintf: Warn on integer scanning overflows
Date: Thu, 8 Jun 2023 18:14:33 +0200 (CEST) [thread overview]
Message-ID: <1744246043.3699439.1686240873455.JavaMail.zimbra@nod.at> (raw)
In-Reply-To: <ZIHlZsPMZ2dI5/yG@smile.fi.intel.com>
----- Ursprüngliche Mail -----
> Von: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>
>> if (prefix_chars < max_chars) {
>> rv = _parse_integer_limit(cp, base, &result, max_chars - prefix_chars);
>> + WARN_ON_ONCE(rv & KSTRTOX_OVERFLOW);
>
> This seems incorrect. simple_strto*() are okay to overflow. It's by design.
Is this design decision also known to all users of scanf functions in the kernel?
Thanks,
//richard
next prev parent reply other threads:[~2023-06-08 16:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-07 22:37 [RFC PATCH 0/1] Integer overflows while scanning for integers Richard Weinberger
2023-06-07 22:37 ` [RFC PATCH 1/1] vsprintf: Warn on integer scanning overflows Richard Weinberger
2023-06-08 14:27 ` Andy Shevchenko
2023-06-08 16:14 ` Richard Weinberger [this message]
2023-06-08 16:23 ` Andy Shevchenko
2023-06-12 6:16 ` kernel test robot
2023-06-07 23:36 ` [RFC PATCH 0/1] Integer overflows while scanning for integers Kees Cook
2023-06-08 15:27 ` Petr Mladek
2023-06-08 16:12 ` Richard Weinberger
2023-06-08 16:19 ` Greg KH
2023-06-08 16:23 ` Richard Weinberger
2023-06-09 10:10 ` Rasmus Villemoes
2023-06-09 17:02 ` Petr Mladek
2023-06-09 17:46 ` Linus Torvalds
2023-06-10 19:31 ` David Laight
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=1744246043.3699439.1686240873455.JavaMail.zimbra@nod.at \
--to=richard@nod.at \
--cc=alex.gaynor@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=ast@kernel.org \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gary@garyguo.net \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=keescook@chromium.org \
--cc=kuba@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=netdev@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=pabeni@redhat.com \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=wedsonaf@gmail.com \
/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).