OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.2 v2 1/8] ms/inet: reject unhashed sockets during established lookups
Date: Wed, 25 Nov 2026 11:35:25 +0100	[thread overview]
Message-ID: <179560292536.21986.15544071028272957061.b4-review@b4> (raw)
In-Reply-To: <20261125062128.1996509-2-eva.kurchatova@virtuozzo.com>

I won't apply this version, please send v3 with the changes below.

- Add 97c8a3c1f73d8 before this patch: item 1 of the cover letter
  reply.

On Wed, 25 Nov 2026 08:14:11 +0200, Eva Kurchatova wrote:
>  	if (nreq) {
>  		__NET_INC_STATS(net, LINUX_MIB_TCPMIGRATEREQFAILURE);
> +		/* The timer was not armed, drop its reference here. */
> +		reqsk_put(nreq);
>  no_ownership:
>  		reqsk_migrate_reset(nreq);
>  		reqsk_queue_removed(queue, nreq);
> -		__reqsk_free(nreq);
> +		/* Drop the temporary reference and the one reserved for ehash. */
> +		reqsk_put(nreq);
> +		reqsk_put(nreq);

Upstream this patch sits on top of 97c8a3c1f73d8. Without it the goto
no_ownership path still leaves the timer of nreq armed. Before this
patch that is a use-after-free; with it, the two puts leave the last
reference to the timer, and the orphaned request keeps sending SYN-ACKs
for a connection that is already established, until the retries run
out.

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  reply	other threads:[~2026-11-25 10:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25  6:14 [Devel] [PATCH hci-8.2 v2 0/8] ms/net: backport request migration RCU fixes and lockless refcount ordering Eva Kurchatova
2026-11-25  6:14 ` [Devel] [PATCH hci-8.2 v2 1/8] ms/inet: reject unhashed sockets during established lookups Eva Kurchatova
2026-11-25 10:35   ` Konstantin Khorenko [this message]
2026-11-25  6:14 ` [Devel] [PATCH hci-8.2 v2 2/8] ms/net: restore refcount ordering for lockless socket access Eva Kurchatova
2026-11-25  6:14 ` [Devel] [PATCH hci-8.2 v2 3/8] ms/tcp: ipv6: do not read ireq->pktopts from tcp_v6_send_synack() Eva Kurchatova
2026-11-25  6:14 ` [Devel] [PATCH hci-8.2 v2 4/8] ms/tcp: ipv6: free ireq->ipv6_opt after an RCU grace period Eva Kurchatova
2026-11-25  6:14 ` [Devel] [PATCH hci-8.2 v2 5/8] ms/tcp: free saved_syn " Eva Kurchatova
2026-11-25  6:14 ` [Devel] [PATCH hci-8.2 v2 6/8] ms/tcp: Pass req->rsk_listener to inet_csk_reqsk_queue_drop() in tcp_check_req() Eva Kurchatova
2026-11-25  6:14 ` [Devel] [PATCH hci-8.2 v2 7/8] ms/tcp: fastopen: note that a child socket was created Eva Kurchatova
2026-11-25 10:35   ` Konstantin Khorenko
2026-11-25  6:14 ` [Devel] [PATCH hci-8.2 v2 8/8] ms/tcp: fix request_sock use-after-free during Fast Open accept() Eva Kurchatova
2026-11-25 10:35 ` [Devel] [PATCH hci-8.2 v2 0/8] ms/net: backport request migration RCU fixes and lockless refcount ordering Konstantin Khorenko

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=179560292536.21986.15544071028272957061.b4-review@b4 \
    --to=khorenko@virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=eva.kurchatova@virtuozzo.com \
    /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