mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gavrilov Ilia <Ilia.Gavrilov@infotecs.ru>
To: Paolo Abeni <pabeni@redhat.com>, Eric Dumazet <edumazet@google.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	David Ahern <dsahern@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"lvc-project@linuxtesting.org" <lvc-project@linuxtesting.org>
Subject: Re: [PATCH net-next] tcp: fix incorrect parameter validation in the do_tcp_getsockopt() function
Date: Wed, 6 Mar 2024 11:54:40 +0000	[thread overview]
Message-ID: <e8b2287f-bf25-4a95-aef2-58067c893b4f@infotecs.ru> (raw)
In-Reply-To: <095ce1d0f2cd6771b30ab1d73ee6aa8e8460c7c8.camel@redhat.com>

On 3/6/24 14:36, Paolo Abeni wrote:
> The above is incorrect, as the 'len' variable is a signed integer

I mean, if 'len' is negative then after this expression
len = min_t(unsigned int, len, sizeof(int));
the 'len' variable will be equal to sizeof(int) == 4
and the statement
if (len < 0) return -EINVAL;
might be unreachable during program execution.

  reply	other threads:[~2024-03-06 11:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-06  9:57 Gavrilov Ilia
2024-03-06 11:36 ` Paolo Abeni
2024-03-06 11:54   ` Gavrilov Ilia [this message]
2024-03-07  8:40     ` Simon Horman
2024-03-07 14:17       ` Gavrilov Ilia
2024-03-06 11:56   ` Jason Xing
2024-03-06 14:55     ` Eric Dumazet

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=e8b2287f-bf25-4a95-aef2-58067c893b4f@infotecs.ru \
    --to=ilia.gavrilov@infotecs.ru \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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

all inboxes | Powered by JetHome®