From: Stephen Hemminger <stephen@networkplumber.org>
To: Andrii Tereshchenko <opensource@andrii.net>
Cc: David Ahern <dsahern@kernel.org>, netdev@vger.kernel.org
Subject: Re: [PATCH iproute2] lib, ip, tc, arpd: refuse out-of-range parsed values
Date: Tue, 1 Dec 2026 22:54:50 -0800 [thread overview]
Message-ID: <20261201225450.6ced9d63@phoenix.local> (raw)
In-Reply-To: <690d7a60-d4d8-473e-84a2-31bfbd74ec01@mid.andrii.net>
On Tue, 1 Dec 2026 10:59:50 -0800
Andrii Tereshchenko <opensource@andrii.net> wrote:
> Several parsers check a value before its unit is applied, or not at
> all, so one that does not fit wraps: tc turns "4295s" into 32704us and
> accepts "nan". ip route's rtt and rttvar scaling and tbf's limit from
> "latency" wrap too, and hfsc gets d wrong for umax above 4294 bytes.
> ip's encaplimit check (get_u8() < -1) never fires, so "encaplimit 300"
> sends an uninitialised byte.
>
> Check once the unit is applied. The lib parsers return -1 for
> malformed input and NaN, -ERANGE for negative or too-large values.
> Refuse an overflowing rtt, rttvar or tbf limit, "%" without digits and
> trailing characters in an sfb probability. Fix the encaplimit test and
> hfsc's 32-bit multiply, and check arpd -p before storing it.
This is iproute2 next material and arpd has been removed.
This needs to be split into much smaller patches for human review.
prev parent reply other threads:[~2026-12-02 6:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 18:59 [PATCH iproute2] lib, ip, tc, arpd: refuse out-of-range parsed values Andrii Tereshchenko
2026-12-02 6:54 ` Stephen Hemminger [this message]
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=20261201225450.6ced9d63@phoenix.local \
--to=stephen@networkplumber.org \
--cc=dsahern@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=opensource@andrii.net \
/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