Skip to content

drivers: sbefifo and occ-hwmon: Fix memory corruption

Eddie James openbmc 1 version Applied

Status from this message: Thanks, applied to dev-4.10.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2drivers (fsi): sbefifo: Fix xfr deletion in listsdrivers/fsi/fsi-sbefifo.c+12 -70 replies
2/2drivers (hwmon): occ: Fix memory allocation for extended sensorsdrivers/hwmon/occ/common.c+1 -10 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH linux dev-4.10 0/2] drivers: sbefifo and occ-hwmon: Fix memory corruption

From: "Edward A. James" <[email protected]>

There was some potential for bad memory access in the sbefifo driver. List iteration will access the current position iterator, which in some cases in the sbefifo driver was freed. Use a safe loop and delete the member from the list first.

The second, more severe, problem was an incorrect amount of memory allocated for the extended sensor attributes in the occ-hwmon driver. That was my mistake in initially adding the extended attributes. I suppose we haven't hit much memory corruption because the occ doesn't normally return extended sensors.

Edward A. James (2):
drivers (fsi): sbefifo: Fix xfr deletion in lists drivers (hwmon): occ: Fix memory allocation for extended sensors

 drivers/fsi/fsi-sbefifo.c  | 19 ++++++++++++-------
 drivers/hwmon/occ/common.c |  2 +-
 2 files changed, 13 insertions(+), 8 deletions(-)
Signature · 1 line
1.8.3.1