From: David Miller <davem@davemloft.net>
To: amessina@google.com
Cc: kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] udp: fix integer overflow while computing available space in sk_rcvbuf
Date: Tue, 24 Dec 2019 14:54:43 -0800 (PST) [thread overview]
Message-ID: <20191224.145443.2006645470880449664.davem@davemloft.net> (raw)
In-Reply-To: <20191219140803.135164-1-amessina@google.com>
From: Antonio Messina <amessina@google.com>
Date: Thu, 19 Dec 2019 15:08:03 +0100
> When the size of the receive buffer for a socket is close to 2^31 when
> computing if we have enough space in the buffer to copy a packet from
> the queue to the buffer we might hit an integer overflow.
>
> When an user set net.core.rmem_default to a value close to 2^31 UDP
> packets are dropped because of this overflow. This can be visible, for
> instance, with failure to resolve hostnames.
>
> This can be fixed by casting sk_rcvbuf (which is an int) to unsigned
> int, similarly to how it is done in TCP.
>
> Signed-off-by: Antonio Messina <amessina@google.com>
Applied and queued up for -stable, thanks.
next prev parent reply other threads:[~2019-12-24 22:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-19 14:08 Antonio Messina
2019-12-24 22:54 ` David Miller [this message]
2021-11-08 15:44 kaz1020
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=20191224.145443.2006645470880449664.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=amessina@google.com \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
/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®