Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
driver core: platform: Don't read past the end of "driver_override" b…
…uffer When printing the driver_override parameter when it is 4095 and 4094 bytes long, the printing code would access invalid memory because we need count+1 bytes for printing. Reject driver_override values of these lengths in driver_override_store(). This is in close analogy to commit 4efe874 ("PCI: Don't read past the end of sysfs "driver_override" buffer") from Sasha Levin. Fixes: 3d713e0 ("driver core: platform: add device binding path 'driver_override'") Cc: [email protected] # v3.17+ Signed-off-by: Nicolai Stange <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information