mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
net/wan/fsl_ucc_hdlc: fix out of bounds write on array utdm_info
[ Upstream commitddf4203905] Array utdm_info is declared as an array of MAX_HDLC_NUM (4) elements however up to UCC_MAX_NUM (8) elements are potentially being written to it. Currently we have an array out-of-bounds write error on the last 4 elements. Fix this by making utdm_info UCC_MAX_NUM elements in size. Addresses-Coverity: ("Out-of-bounds write") Fixes:c19b6d246a("drivers/net: support hdlc function for QE-UCC") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
04eb36e5d6
commit
bb7f182fe5
@@ -73,7 +73,7 @@ static struct ucc_tdm_info utdm_primary_info = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct ucc_tdm_info utdm_info[MAX_HDLC_NUM];
|
||||
static struct ucc_tdm_info utdm_info[UCC_MAX_NUM];
|
||||
|
||||
static int uhdlc_init(struct ucc_hdlc_private *priv)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user