]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
bcma: fix buffer size caused crash in bcma_core_mips_print_irq()
authorRafał Miłecki <rafal@milecki.pl>
Tue, 8 May 2018 09:31:04 +0000 (11:31 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 27 Aug 2018 14:40:05 +0000 (16:40 +0200)
commited1fe53e80e2c6215eff57a757817c5d0c3c8ca0
treed742dd4a39cdb6e84287274f40990ab3ae6b2e4f
parentce87a3c5d6a4fb9a8618b3083b8dacff9f72c8d6
bcma: fix buffer size caused crash in bcma_core_mips_print_irq()

BugLink: http://bugs.launchpad.net/bugs/1786352
commit 361de091a4b97aa9081d304d742f80d486ab7125 upstream.

Used buffer wasn't big enough to hold whole strings. Example output of
this function is:
[    0.180892] bcma: bus0: core 0x0800, irq: 2(S)* 3  4  5  6  D  I
[    0.180948] bcma: bus0: core 0x0812, irq: 2(S)  3* 4  5  6  D  I
[    0.180998] bcma: bus0: core 0x082d, irq: 2(S)  3  4* 5  6  D  I
[    0.181046] bcma: bus0: core 0x082c, irq: 2(S)  3  4  5  6  D  I*
which means we need to store up to 24 chars.

Fixes: 758f7e06063a8 ("bcma: Use bcma_debug and not pr_cont in MIPS driver")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Cc: stable@vger.kernel.org # v4.15+
Signed-off-by: Kalle Valo <kvalo@codeaurora.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/bcma/driver_mips.c