Netdev List
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: netdev@vger.kernel.org, dsahern@kernel.org
Subject: Re: [PATCH iproute2-main] libnetlink: handle failed time seeds and sequence wrap
Date: Sun, 8 Nov 2026 17:58:16 -0800	[thread overview]
Message-ID: <20261108175816.07cb4a61@phoenix.local> (raw)
In-Reply-To: <20261103215932.1191741-1-f.fainelli@gmail.com>

On Tue,  3 Nov 2026 13:59:32 -0800
Florian Fainelli <f.fainelli@gmail.com> wrote:

> A 32-bit time_t overflows when the board clock is beyond 2038. time()
> returns -1, and the first request then has sequence zero. The sequence
> range check underflows and discards the valid reply, leaving ip blocked
> in recvmsg(). The same range check also fails on a normal counter wrap.
> 
> Use zero as a fallback seed when time() fails. Compare the unsigned
> sequence distance against the number of requests, allowing wraparound
> and rejecting the sequence immediately before the first request.
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---

I put a better more general solution into the recent netlink fixes

      reply	other threads:[~2026-11-09  1:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 21:59 [PATCH iproute2-main] libnetlink: handle failed time seeds and sequence wrap Florian Fainelli
2026-11-09  1:58 ` 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=20261108175816.07cb4a61@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=dsahern@kernel.org \
    --cc=f.fainelli@gmail.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