MPTCP Linux Development
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Davide Caratti <dcaratti@redhat.com>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-net] mptcp: fix double-free on socket dismantle
Date: Thu, 22 Feb 2024 10:21:22 +0100	[thread overview]
Message-ID: <cebdec56-dd07-4613-8980-12deaeee8a82@kernel.org> (raw)
In-Reply-To: <47b5459f6b9b07c5a669d5a5233b35cf6ec601ac.1708532911.git.dcaratti@redhat.com>

Hi Davide, Mat,

On 21/02/2024 5:30 pm, Davide Caratti wrote:
> when MPTCP server accepts an incoming connection, it clones its listener
> socket. However, the pointer to 'inet_opt' for the new socket has the same
> value as the original one: as a consequence, on program exit it's possible
> to observe the following splat:

(...)

> Something similar (a refcount underflow) happens with CALIPSO/IPv6. Fix
> this by duplicating IP / IPv6 options after clone, so that
> ip{,6}_sock_destruct() doesn't end up freeing the same memory area twice.

Thank you for the patch and the review!

Now in our tree (fix for -net), with Mat's RvB and Fixes tags:

New patches for t/upstream-net and t/upstream:
- 6d6a1d5ea72e: mptcp: fix double-free on socket dismantle
- Results: 74677c9f0a8c..b35846da7660 (export-net)
- Results: 55a829ff16aa..df010bcea0cb (export)

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.

      parent reply	other threads:[~2024-02-22  9:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-21 16:30 [PATCH mptcp-net] mptcp: fix double-free on socket dismantle Davide Caratti
2024-02-21 17:25 ` mptcp: fix double-free on socket dismantle: Tests Results MPTCP CI
2024-02-22  2:32 ` [PATCH mptcp-net] mptcp: fix double-free on socket dismantle Mat Martineau
2024-02-22  3:26 ` mptcp: fix double-free on socket dismantle: Tests Results MPTCP CI
2024-02-22  9:21 ` Matthieu Baerts [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=cebdec56-dd07-4613-8980-12deaeee8a82@kernel.org \
    --to=matttbe@kernel.org \
    --cc=dcaratti@redhat.com \
    --cc=mptcp@lists.linux.dev \
    /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