From: Andrew Lunn <andrew@lunn.ch>
To: "Peter GJ. Park" <gyujoon.park@samsung.com>
Cc: 'Paolo Abeni' <pabeni@redhat.com>,
'Oliver Neukum' <oneukum@suse.com>,
'Andrew Lunn' <andrew+netdev@lunn.ch>,
"'David S. Miller'" <davem@davemloft.net>,
'Eric Dumazet' <edumazet@google.com>,
'Jakub Kicinski' <kuba@kernel.org>,
netdev@vger.kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: usb: usbnet: fix use-after-free in race on workqueue
Date: Fri, 27 Jun 2025 09:40:44 +0200 [thread overview]
Message-ID: <03658d2b-04c8-43f8-a486-33572a2e61df@lunn.ch> (raw)
In-Reply-To: <00d001dbe72a$62281bc0$26785340$@samsung.com>
On Fri, Jun 27, 2025 at 03:11:55PM +0900, Peter GJ. Park wrote:
> >On 6/25/25 11:33 AM, Peter GJ. Park wrote:
> >> When usbnet_disconnect() queued while usbnet_probe() processing, it
> >> results to free_netdev before kevent gets to run on workqueue, thus
> >> workqueue does assign_work() with referencing freeed memory address.
> >>
> >> For graceful disconnect and to prevent use-after-free of netdev
> >> pointer, the fix adds canceling work and timer those are placed by
> >> usbnet_probe()
> >>
> >> Signed-off-by: Peter GJ. Park <gyujoon.park@samsung.com>
> >
> >You should include a suitable fixes tag, and you should have specified the target tree ('net' in this case) in the prefix subjext
> Prefix net added to subject, but for fixes tag, by looking git blame, the last line of usbnet_disconnect()are based on initial commit,
> thus I couldn't put the fixes tag for it. Please let me know how can I handle this.
By initial commit, do you mean:
commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (tag: v2.6.12-rc2)
Author: Linus Torvalds <torvalds@ppc970.osdl.org>
Date: Sat Apr 16 15:20:36 2005 -0700
Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Then use that as the Fixes: tag. The Fixes: tag is a guide to
developers who do the backport. Nobody is going to backport this to
2.6.12, but it does make it clear that LTS 5.4.294 could get this
patch.
Andrew
next prev parent reply other threads:[~2025-06-27 7:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20250627061156epcas1p1dfe3323378b314d98b660de33f50e0c2@epcas1p1.samsung.com>
2025-06-27 6:11 ` Peter GJ. Park
2025-06-27 7:40 ` Andrew Lunn [this message]
[not found] <CGME20250625093354epcas1p1c9817df6e1d1599e8b4eb16c5715a6fd@epcas1p1.samsung.com>
2025-06-25 9:33 ` [PATCH] " Peter GJ. Park
2025-06-26 9:21 ` Paolo Abeni
2025-07-01 4:19 ` [PATCH net] " Peter GJ. Park
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=03658d2b-04c8-43f8-a486-33572a2e61df@lunn.ch \
--to=andrew@lunn.ch \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gyujoon.park@samsung.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oneukum@suse.com \
--cc=pabeni@redhat.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
all inboxes | Powered by JetHome®