public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] software node: Use-after-free fix in drivers/base/swnode.c
@ 2026-02-24 19:19 mike.isely
  2026-02-24 19:19 ` [PATCH 1/1] sofware node: Only the managing device can unreference managed software node mike.isely
  2026-02-25  9:46 ` [PATCH 0/1] software node: Use-after-free fix in drivers/base/swnode.c Andy Shevchenko
  0 siblings, 2 replies; 17+ messages in thread
From: mike.isely @ 2026-02-24 19:19 UTC (permalink / raw)
  To: Andy Shevchenko, Daniel Scally, Heikki Krogerus, Sakari Ailus
  Cc: Mike Isely, Mike Isely, linux-acpi, linux-kernel

From: Mike Isely <mike.isely@cobaltdigital.com>

Correct issue in drivers/base/swnode.c that can lead to use-after-free
due to kobject reference counting error, which itself is due to
incorrect behavior with the "managed" struct swnode flag in
circumstances involving child struct device instances where the parent
struct device is managing a struct swnode.

Use-after-free in this case led to an Oops and a subsequent kernel
memory leak, but realistically it's kernel heap corruption, so any
manner of chaos can result, if left unaddressed.

This was detected in kernel 6.12, verified also in kernel 6.6.  Visual
inspection in 6.19.3 source (the latest as of right now) shows the
same issue.  The nearly trivial fix was verified in 6.12.  While this
patches against 6.19.3, IMHO this is a candidate for all LTS kernels.

Mike Isely (1):
  sofware node: Only the managing device can unreference managed
    software node

 drivers/base/swnode.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
2.47.3


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2026-02-28 16:34 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-24 19:19 [PATCH 0/1] software node: Use-after-free fix in drivers/base/swnode.c mike.isely
2026-02-24 19:19 ` [PATCH 1/1] sofware node: Only the managing device can unreference managed software node mike.isely
2026-02-25 11:22   ` Andy Shevchenko
2026-02-25 19:42     ` Mike Isely
2026-02-25 20:01       ` Andy Shevchenko
2026-02-25 20:16         ` Mike Isely
2026-02-26  7:16           ` Andy Shevchenko
2026-02-26 19:06             ` Mike Isely
2026-02-26 20:42               ` Andy Shevchenko
2026-02-27 17:55                 ` Mike Isely
2026-02-28 11:02                   ` Andy Shevchenko
2026-02-28 16:34                     ` Mike Isely
2026-02-25  9:46 ` [PATCH 0/1] software node: Use-after-free fix in drivers/base/swnode.c Andy Shevchenko
2026-02-25 18:59   ` Mike Isely
2026-02-25 19:17     ` Andy Shevchenko
2026-02-25 19:48       ` Mike Isely
2026-02-25 20:05         ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox