Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 389721fa authored by Nicolai Stange's avatar Nicolai Stange Committed by Greg Kroah-Hartman
Browse files

driver core: platform: Don't read past the end of "driver_override" buffer



commit bf563b01c2895a4bfd1a29cc5abc67fe706ecffd upstream.

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 4efe874aace5 ("PCI: Don't read past the
end of sysfs "driver_override" buffer") from Sasha Levin.

Fixes: 3d713e0e ("driver core: platform: add device binding path 'driver_override'")
Signed-off-by: default avatarNicolai Stange <nstange@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e29b6128
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment