]> git.itanic.dy.fi Git - linux-stable/commit
usb: xhci-mtk: fix issue of out-of-bounds array access
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Tue, 17 Aug 2021 08:36:25 +0000 (16:36 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Sep 2022 09:04:08 +0000 (11:04 +0200)
commit1438e412aeda2db2edde26f4d46c67a2f333fe53
tree89022738153d2435f213e327d84f485071a4bc3d
parent2e473351400e3dd66f0b71eddcef82ee45a584c1
usb: xhci-mtk: fix issue of out-of-bounds array access

commit de5107f473190538a65aac7edea85209cd5c1a8f upstream.

Bus bandwidth array access is based on esit, increase one
will cause out-of-bounds issue; for example, when esit is
XHCI_MTK_MAX_ESIT, will overstep boundary.

Fixes: 7c986fbc16ae ("usb: xhci-mtk: get the microframe boundary for ESIT")
Cc: <stable@vger.kernel.org>
Reported-by: Stan Lu <stan.lu@mediatek.com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/1629189389-18779-5-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mtk-sch.c