All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3]: hp-wmi: fix various issues with
@ 2026-07-12 19:11 yahia
  2026-07-12 19:11 ` [PATCH 1/3] hp-wmi: refactor to use __free yahia
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: yahia @ 2026-07-12 19:11 UTC (permalink / raw)
  To: ilpo.jarvinen; +Cc: platform-driver-x86, yahia ahmed

From: yahia ahmed <yahia.a.abdrabou@gmail.com>

hp_wmi_perform_query() currently has potential security issue and
doesn't use cleanups like __free.

Patch 1 adds the __cleanup attribute to arg and obj variables and
removes the out label.

Patch 2 addresses a potential integer underflow flagged by sashiko that
hp_wmi_perform_query() currently uses the length reported by bios and
bios_return structure blindly, which can cause issues as passing an 
small buffer or a bios returning a value smaller than bios_return will
lead to a large number being passed to memcpy, Fix this by adding a check
and exiting if bios_return is larger than the length reported by bios.

Patch 3 addresses a potential security issue flagged by sashiko that
kmalloc doesn't zero out the page before handing it, Fix this by using
kzalloc to zero the page and allocate enough memory rather than 128
bytes.

yahia (3):
  hp-wmi: refactor to use __free
  hp-wmi: fix potential integer underflow
  hp-wmi: move from kmalloc to kzalloc

 drivers/platform/x86/hp/hp-wmi.c | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

-- 
2.55.0


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

end of thread, other threads:[~2026-07-13 12:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-12 19:11 [PATCH 0/3]: hp-wmi: fix various issues with yahia
2026-07-12 19:11 ` [PATCH 1/3] hp-wmi: refactor to use __free yahia
2026-07-13 11:21   ` Ilpo Järvinen
2026-07-12 19:11 ` [PATCH 2/3] hp-wmi: fix potential integer underflow yahia
2026-07-13 11:23   ` Ilpo Järvinen
2026-07-13 12:24     ` yahia
2026-07-12 19:11 ` [PATCH 3/3] hp-wmi: move from kmalloc to kzalloc yahia
2026-07-13 11:30   ` Ilpo Järvinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.