From: Jakub Kicinski <kuba@kernel.org>
To: "luwei (O)" <luwei32@huawei.com>
Cc: Networking <netdev@vger.kernel.org>
Subject: Re: [Question] integer overflow in function __qdisc_calculate_pkt_len()
Date: Tue, 6 Jun 2023 08:49:19 -0700 [thread overview]
Message-ID: <20230606084919.5549dd58@kernel.org> (raw)
In-Reply-To: <c6ab254d-76c3-7507-3935-e9bad4da0bab@huawei.com>
On Tue, 6 Jun 2023 20:54:47 +0800 luwei (O) wrote:
> > on a quick look limiting the cell_align to S16_MIN at the netlink level
> > (NLA_POLICY_MIN()) seems reasonable, feel free to send a patch.
> > .
>
> Thanks for your reply, but do your mean cell_align or overhead? It seems
> limit cell_align to
>
> S16_MIN(-32768) can still cause the overflow:
>
> 66 + (-2147483559) + (-32767) = 2147451036
>
> skb->len = 66
> stab->szopts.overhead = -2147483559
> stab->szopts.cell_align = -32767
Could you explain what the problem caused by the overflow will be?
next prev parent reply other threads:[~2023-06-06 15:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 2:50 [Question] integer overflow in function __qdisc_calculate_pkt_len() luwei (O)
2023-06-05 23:19 ` Jakub Kicinski
2023-06-06 12:54 ` luwei (O)
2023-06-06 15:49 ` Jakub Kicinski [this message]
2023-06-25 2:19 ` luwei (O)
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=20230606084919.5549dd58@kernel.org \
--to=kuba@kernel.org \
--cc=luwei32@huawei.com \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).