From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Colin Ian King <colin.king@canonical.com>,
"David S . Miller" <davem@davemloft.net>,
Sasha Levin <sashal@kernel.org>,
netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 5.4 083/107] net/wan/fsl_ucc_hdlc: fix out of bounds write on array utdm_info
Date: Fri, 24 Jan 2020 09:17:53 -0500 [thread overview]
Message-ID: <20200124141817.28793-83-sashal@kernel.org> (raw)
In-Reply-To: <20200124141817.28793-1-sashal@kernel.org>
From: Colin Ian King <colin.king@canonical.com>
[ Upstream commit ddf420390526ede3b9ff559ac89f58cb59d9db2f ]
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: c19b6d246a35 ("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: Sasha Levin <sashal@kernel.org>
---
drivers/net/wan/fsl_ucc_hdlc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c
index ca0f3be2b6bf8..aef7de225783f 100644
--- a/drivers/net/wan/fsl_ucc_hdlc.c
+++ b/drivers/net/wan/fsl_ucc_hdlc.c
@@ -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)
{
--
2.20.1
next prev parent reply other threads:[~2020-01-24 14:33 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-24 14:16 [PATCH AUTOSEL 5.4 001/107] batman-adv: Fix DAT candidate selection on little endian systems Sasha Levin
2020-01-24 14:16 ` [PATCH AUTOSEL 5.4 025/107] mac80211: mesh: restrict airtime metric to peered established plinks Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 038/107] i40e: Fix virtchnl_queue_select bitmap validation Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 039/107] ixgbevf: Remove limit of 10 entries for unicast filter list Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 040/107] ixgbe: Fix calculation of queue with VFs and flow director on interface flap Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 041/107] igb: Fix SGMII SFP module discovery for 100FX/LX Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 042/107] iavf: remove current MAC address filter on VF reset Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 044/107] bpf/sockmap: Read psock ingress_msg before sk_receive_queue Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 045/107] sh_eth: check sh_eth_cpu_data::dual_port when dumping registers Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 047/107] net: bpf: Don't leak time wait and request sockets Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 048/107] net: stmmac: selftests: Update status when disabling RSS Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 049/107] net: stmmac: tc: Do not setup flower filtering if RSS is enabled Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 059/107] netfilter: fix a use-after-free in mtype_destroy() Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 060/107] netfilter: arp_tables: init netns pointer in xt_tgdtor_param struct Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 061/107] qmi_wwan: Add support for Quectel RM500Q Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 065/107] ptp: free ptp device pin descriptors properly Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 066/107] net: usb: lan78xx: limit size of local TSO packets Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 067/107] r8152: add missing endpoint sanity check Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 068/107] wireless: fix enabling channel 12 for custom regulatory domain Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 069/107] cfg80211: Fix radar event during another phy CAC Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 070/107] mac80211: Fix TKIP replay protection immediately after key setup Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 071/107] wireless: wext: avoid gcc -O3 warning Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 072/107] cfg80211: check for set_wiphy_params Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 075/107] mlxsw: spectrum: Do not modify cloned SKBs during xmit Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 076/107] mlxsw: switchx2: " Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 078/107] mlxsw: spectrum: Wipe xstats.backlog of down ports Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 081/107] hv_netvsc: Fix memory leak when removing rndis device Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 082/107] bpf: Fix incorrect verifier simulation of ARSH under ALU32 Sasha Levin
2020-01-24 14:17 ` Sasha Levin [this message]
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 084/107] net: stmmac: selftests: Make it work in Synopsys AXS101 boards Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 085/107] net: stmmac: selftests: Mark as fail when received VLAN ID != expected Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 088/107] net: hns3: pad the short frame before sending to the hardware Sasha Levin
2020-01-24 14:17 ` [PATCH AUTOSEL 5.4 089/107] net: ethernet: ave: Avoid lockdep warning Sasha Levin
2020-01-24 14:18 ` [PATCH AUTOSEL 5.4 090/107] netfilter: nf_tables: store transaction list locally while requesting module Sasha Levin
2020-01-24 14:18 ` [PATCH AUTOSEL 5.4 091/107] netfilter: nft_tunnel: fix null-attribute check Sasha Levin
2020-01-24 14:18 ` [PATCH AUTOSEL 5.4 092/107] netfilter: nft_tunnel: ERSPAN_VERSION must not be null Sasha Levin
2020-01-24 14:18 ` [PATCH AUTOSEL 5.4 093/107] netfilter: nf_tables: remove WARN and add NLA_STRING upper limits Sasha Levin
2020-01-24 14:18 ` [PATCH AUTOSEL 5.4 094/107] netfilter: nf_tables: fix flowtable list del corruption Sasha Levin
2020-01-24 14:18 ` [PATCH AUTOSEL 5.4 095/107] netfilter: nat: fix ICMP header corruption on ICMP errors Sasha Levin
2020-01-24 14:18 ` [PATCH AUTOSEL 5.4 096/107] net: hns: fix soft lockup when there is not enough memory Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200124141817.28793-83-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=colin.king@canonical.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).