Netdev List
 help / color / mirror / Atom feed
From: "Jérémy Jean" <jeremy.jean@oss.cyber.gouv.fr>
To: Tung Quang Nguyen <tung.quang.nguyen@est.tech>
Cc: netdev@vger.kernel.org, tipc-discussion@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Jon Maloy <jmaloy@redhat.com>
Subject: Re: [PATCH net] tipc: protect received keys from concurrent flush
Date: Fri, 02 Oct 2026 14:42:22 +0200	[thread overview]
Message-ID: <df6d6c550f8e7ed7bad690ae9c581645@oss.cyber.gouv.fr> (raw)
In-Reply-To: <DU4P189MB37502D602C60A78B58AFDDA1C6892@DU4P189MB3750.EURP189.PROD.OUTLOOK.COM>

On 2026-10-02 14:09, Tung Quang Nguyen wrote:
>> Subject: [PATCH net] tipc: protect received keys from concurrent flush
>> 
>> tipc_crypto_key_synch() can queue the RX worker again while it is 
>> still using rx-
>>> skey. If tipc_crypto_key_flush() cancels that queued work, it frees 
>>> the key
>> without waiting for the running worker. The worker can then read freed
>> memory or free the key a second time. Racing key exchange with key 
>> flush
>> triggers KASAN:
>> 
>>  [   12.986077] BUG: KASAN: double-free in
>> tipc_crypto_key_flush+0x401/0x530
>>  [   12.987937] Free of addr ff11000002268080 by task peer/112
>>  ...
>>  [   12.991938]  kfree+0x163/0x430
>>  ...
>>  [   12.991983]  tipc_crypto_key_flush+0x401/0x530
>>  ...
>>  [   12.992152]  tipc_nl_node_flush_key+0x174/0x210
>> 
> Please update your changelog with decoded stack trace.

You mean the full trace including the parts I snipped?

> Do you have a reproducer ?

Yes, I have.

Jérémy

  reply	other threads:[~2026-10-02 12:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30 11:57 [PATCH net] tipc: protect received keys from concurrent flush Jérémy Jean
2026-10-02  2:57 ` netdev-bot+sashiko
2026-10-02 12:05   ` Tung Quang Nguyen
2026-10-02 12:39     ` Jérémy Jean
2026-10-02 12:09 ` Tung Quang Nguyen
2026-10-02 12:42   ` Jérémy Jean [this message]
2026-10-02 12:50     ` Tung Quang Nguyen
2026-10-02 12:58       ` Jérémy Jean

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=df6d6c550f8e7ed7bad690ae9c581645@oss.cyber.gouv.fr \
    --to=jeremy.jean@oss.cyber.gouv.fr \
    --cc=jmaloy@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tipc-discussion@lists.sourceforge.net \
    --cc=tung.quang.nguyen@est.tech \
    /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