* out of bounds read in drivers/net/wireless/ray_cs.c
@ 2018-12-20 13:06 Colin Ian King
2018-12-20 13:12 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2018-12-20 13:06 UTC (permalink / raw)
To: Kalle Valo, David S. Miller, linux-wireless@vger.kernel.org,
netdev
Cc: linux-kernel@vger.kernel.org
Static analysis with CoverityScan picked up an out of bounds read issue
that has been in the Raylink wireless LAN card driver since it appeared
in the kernel:
drivers/net/wireless/ray_cs.c:
accessing org[3] is out of bounds, the array has just 3 elements.
959 if (proto == htons(ETH_P_AARP) || proto ==
htons(ETH_P_IPX)) {
960 /* This is the selective translation table,
only 2 entries */
CID undefined (#1 of 1): Out-of-bounds read
overrun-local: Overrunning array of 3 bytes at byte offset 3 by
dereferencing pointer &((struct snaphdr_t *)ptx->var)->org[3].
961 writeb(0xf8,
962 &((struct snaphdr_t __iomem
*)ptx->var)->org[3]);
963 }
I suspect the org[3] is a typo and should be org[2], but I don't have
any info on the H/W so I'm speculating that this is the issue. Any ideas
anyone?
Colin
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: out of bounds read in drivers/net/wireless/ray_cs.c
2018-12-20 13:06 out of bounds read in drivers/net/wireless/ray_cs.c Colin Ian King
@ 2018-12-20 13:12 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2018-12-20 13:12 UTC (permalink / raw)
To: Colin Ian King
Cc: David S. Miller, linux-wireless@vger.kernel.org, netdev,
linux-kernel@vger.kernel.org
Colin Ian King <colin.king@canonical.com> writes:
> Static analysis with CoverityScan picked up an out of bounds read issue
> that has been in the Raylink wireless LAN card driver since it appeared
> in the kernel:
>
> drivers/net/wireless/ray_cs.c:
>
> accessing org[3] is out of bounds, the array has just 3 elements.
>
> 959 if (proto == htons(ETH_P_AARP) || proto ==
> htons(ETH_P_IPX)) {
> 960 /* This is the selective translation table,
> only 2 entries */
>
> CID undefined (#1 of 1): Out-of-bounds read
> overrun-local: Overrunning array of 3 bytes at byte offset 3 by
> dereferencing pointer &((struct snaphdr_t *)ptx->var)->org[3].
>
> 961 writeb(0xf8,
> 962 &((struct snaphdr_t __iomem
> *)ptx->var)->org[3]);
> 963 }
>
> I suspect the org[3] is a typo and should be org[2], but I don't have
> any info on the H/W so I'm speculating that this is the issue. Any ideas
> anyone?
I have never heard anyone using this driver so I suspect you won't get
any help with testing. Just send a patch fixing the issue, and if it
breaks something then at least we know someone is using the driver :)
--
Kalle Valo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-20 13:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-20 13:06 out of bounds read in drivers/net/wireless/ray_cs.c Colin Ian King
2018-12-20 13:12 ` Kalle Valo
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).