]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: amba: Don't read past the end of sysfs "driver_override" buffer
authorGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 10 Apr 2018 13:21:45 +0000 (15:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Apr 2018 16:07:17 +0000 (18:07 +0200)
commit1ab2b2ce93b36dc9ab9e620ba90b95dc53a9e446
treea3a11243b2bff482034b31415fa485407d2c0ecb
parentec4a0a0601e6c58aba6bd7eb4e75da03b9b2396f
ARM: amba: Don't read past the end of sysfs "driver_override" buffer

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.

Cfr. commits 7a8b0be1e15b6c74 ("PCI: Don't read past the end of sysfs
"driver_override" buffer") and 76cdf14cd54dc06e ("driver core: platform:
Don't read past the end of "driver_override" buffer").

Fixes: 1a90ac7b8df327bc ("ARM: 8256/1: driver coamba: add device binding path 'driver_override'")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Todd Kjos <tkjos@google.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/amba/bus.c