]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:24:23 +0000 (12:24 +0200)
commitb8b95a0d77032c5cf308f082f0eabd1dc4b00bf8
tree62a050e1402af5c768d66b6e3da29c8d0f0df539
parent21b052fafa6d038e072669d6d8320db15a9d539e
ARM: amba: Don't read past the end of sysfs "driver_override" buffer

BugLink: http://bugs.launchpad.net/bugs/1778265
commit d2ffed5185df9d8d9ccd150e4340e3b6f96a8381 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.

Cfr. commits 4efe874aace57dba ("PCI: Don't read past the end of sysfs
"driver_override" buffer") and bf563b01c2895a4b ("driver core: platform:
Don't read past the end of "driver_override" buffer").

Fixes: 3cf385713460eb2b ("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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/amba/bus.c