Skip to content

: hp-wmi: fix various issues with

yahia platform-driver-x86 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3hp-wmi: refactor to use __freedrivers/platform/x86/hp/hp-wmi.c+7 -131 reply
2/3hp-wmi: fix potential integer underflowdrivers/platform/x86/hp/hp-wmi.c+4 -02 replies
3/3hp-wmi: move from kmalloc to kzallocdrivers/platform/x86/hp/hp-wmi.c+1 -11 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3]: hp-wmi: fix various issues with

From: yahia ahmed <[email protected]>

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(-)
Signature · 1 line
2.55.0