From: Kuniyuki Iwashima <kuniyu@google.com>
To: Wentao Guan <guanwentao@uniontech.com>
Cc: edumazet@kernel.org, ncardwell@google.com, imv4bel@gmail.com,
martin.lau@linux.dev, jiayuan.chen@linux.dev,
netdev@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH net] inet: reject unhashed sockets during timewait purge
Date: Sat, 21 Nov 2026 18:57:55 +0000 [thread overview]
Message-ID: <awHpd6a9_S_oI6kg@google.com> (raw)
In-Reply-To: <1595ACC3A3D11BB8+20261119041113.3514099-2-guanwentao@uniontech.com>
On Thu, 19 Nov 2026 12:11:14 +0800, Wentao Guan wrote:
> A shared ehash can retain a stale pointer that is recycled as an
> unhashed SYN-cookie request from another dead namespace. The namespace
> recheck alone accepts that request, and
> inet_csk_reqsk_queue_drop_and_put() can then operate on an uninitialized
> timer.
>
> This is the inet_twsk_purge() counterpart of the validation added for
> established lookups. Recheck the nulls node after taking the reference.
> If it is unhashed, drop the reference and restart the purge instead of
> operating on the recycled request.
>
> Fixes: 4e2b3ef19e0e ("inet: reject unhashed sockets during established lookups")
> Cc: stable@vger.kernel.org
> Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
The correct tag is
Fixes: 740ea3c4a0b2 ("tcp: Clean up kernel listener's reqsk in inet_twsk_purge()")
otherwise looks good.
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Thanks
prev parent reply other threads:[~2026-11-21 18:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 4:11 [PATCH net] inet: reject unhashed sockets during timewait purge Wentao Guan
2026-11-19 4:17 ` netdev-bot+sinfo
2026-11-21 18:57 ` Kuniyuki Iwashima [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=awHpd6a9_S_oI6kg@google.com \
--to=kuniyu@google.com \
--cc=edumazet@kernel.org \
--cc=guanwentao@uniontech.com \
--cc=imv4bel@gmail.com \
--cc=jiayuan.chen@linux.dev \
--cc=martin.lau@linux.dev \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=stable@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 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.