The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Wang Zhaolong <wangzhaolong1@huawei.com>
To: <cve@kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-cve-announce@vger.kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: CVE-2025-22077: smb: client: Fix netns refcount imbalance causing leaks and use-after-free
Date: Mon, 21 Apr 2025 10:59:47 +0800	[thread overview]
Message-ID: <bf2e5c68-e20c-437e-9aa8-1b5326f4fd14@huawei.com> (raw)
In-Reply-To: <fa7af63c-899e-4eb5-89d2-27013f4d2618@huawei.com>


Given these findings, I recommend updating CVE-2025-22077 to reflect that the true fix
is the reversion of e9f2517a3e18 (via commit 95d2b9f693ff).

Best regards,
Wang Zhaolong

> Dear CVE Community,
> 
> As the author of commit 4e7f1644f2ac ("smb: client: Fix netns refcount imbalance
> causing leaks and use-after-free"), I want to clarify some confusion around the
> proper fixes for these issues:
> 
> 1. Commit 4e7f1644f2ac is currently associated with CVE-2025-22077. However, this
> patch was merely attempting to fix issues introduced by commit e9f2517a3e18 ("smb:
> client: fix TCP timers deadlock after rmmod").
> 
> 2. As I've previously discussed with Greg Kroah-Hartman on the kernel mailing list[1],
>     commit e9f2517a3e18 (which was intended to address CVE-2024-54680):
>     - Failed to address the actual null pointer dereference in lockdep
>     - Introduced multiple serious issues:
>       - Socket leak vulnerability (bugzilla #219972)
>       - Network namespace refcount imbalance (bugzilla #219792)
> 
> 3. Our testing and analysis confirms that the original fix by Kuniyuki Iwashima,
> commit ef7134c7fc48 ("smb: client: Fix use-after-free of network namespace."), is
> actually the correct approach. This patch properly handles network namespace
> reference counting without introducing the problems that e9f2517a3e18 did.
> 
> 4. The proper resolution for these issues was ultimately commit 95d2b9f693ff
> ("Revert 'smb: client: fix TCP timers deadlock after rmmod'"), which reverted
> the problematic patch. In the latest Linux mainline code, the problematic patch and
> my subsequent fix patch have been reverted.[2][3]
> 
> Thank you for your attention to this matter. I'm happy to provide additional details if needed.
> 
> [1] https://lore.kernel.org/all/2025040248-tummy-smilingly-4240@gregkh/
> [2] https://github.com/torvalds/linux/commit/c707193a17128fae2802d10cbad7239cc57f0c95
> [3] https://github.com/torvalds/linux/commit/4e7f1644f2ac6d01dc584f6301c3b1d5aac4eaef
> 
> Best regards,
> Wang Zhaolong
> 

  reply	other threads:[~2025-04-21  2:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2025041612-CVE-2025-22077-d534@gregkh>
2025-04-21  2:52 ` CVE-2025-22077: smb: client: Fix netns refcount imbalance causing leaks and use-after-free Wang Zhaolong
2025-04-21  2:59   ` Wang Zhaolong [this message]
2025-04-21  6:49     ` Greg KH
2025-04-21 14:18       ` Wang Zhaolong
2025-04-22  5:36         ` Greg KH

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=bf2e5c68-e20c-437e-9aa8-1b5326f4fd14@huawei.com \
    --to=wangzhaolong1@huawei.com \
    --cc=cve@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-cve-announce@vger.kernel.org \
    --cc=linux-kernel@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