All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: YueHaibing <yuehaibing@huawei.com>
Cc: <davem@davemloft.net>, <edumazet@google.com>, <pabeni@redhat.com>,
	<corbet@lwn.net>, <dsahern@kernel.org>, <kuniyu@amazon.com>,
	<netdev@vger.kernel.org>, <linux-doc@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] tcp: restrict net.ipv4.tcp_app_win
Date: Thu, 6 Apr 2023 18:59:26 -0700	[thread overview]
Message-ID: <20230406185926.7da74db2@kernel.org> (raw)
In-Reply-To: <20230406063450.19572-1-yuehaibing@huawei.com>

On Thu, 6 Apr 2023 14:34:50 +0800 YueHaibing wrote:
> UBSAN: shift-out-of-bounds in net/ipv4/tcp_input.c:555:23
> shift exponent 255 is too large for 32-bit type 'int'
> CPU: 1 PID: 7907 Comm: ssh Not tainted 6.3.0-rc4-00161-g62bad54b26db-dirty #206
> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
> Call Trace:
>  <TASK>
>  dump_stack_lvl+0x136/0x150
>  __ubsan_handle_shift_out_of_bounds+0x21f/0x5a0
>  tcp_init_transfer.cold+0x3a/0xb9
>  tcp_finish_connect+0x1d0/0x620
>  tcp_rcv_state_process+0xd78/0x4d60
>  tcp_v4_do_rcv+0x33d/0x9d0
>  __release_sock+0x133/0x3b0
>  release_sock+0x58/0x1b0
> 
> 'maxwin' is int, shifting int for 32 or more bits is undefined behaviour.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Fixes tag?

  parent reply	other threads:[~2023-04-07  1:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-06  6:34 [PATCH net] tcp: restrict net.ipv4.tcp_app_win YueHaibing
2023-04-06  8:13 ` Eric Dumazet
2023-04-06 20:36 ` Kuniyuki Iwashima
2023-04-07  1:59 ` Jakub Kicinski [this message]
2023-04-07  2:19   ` Kuniyuki Iwashima
2023-04-07  8:10 ` 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=20230406185926.7da74db2@kernel.org \
    --to=kuba@kernel.org \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=kuniyu@amazon.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=yuehaibing@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.