kernel-hardening.lists.openwall.com archive mirror
 help / color / mirror / Atom feed
* OOB accesses in ax88179_rx_fixup() (in USB network card driver) - variants
@ 2022-03-21  9:39 Marcin Kozlowski
  2022-03-26 17:09 ` Marcin Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: Marcin Kozlowski @ 2022-03-21  9:39 UTC (permalink / raw)
  To: kernel-hardening

[-- Attachment #1: Type: text/plain, Size: 901 bytes --]

Hi List,

Don't have much experience and knowledge in that area.

Found this:

https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?h=usb-linus&id=57bc3d3ae8c14df3ceb4e17d26ddf9eeab304581

Checked out a few drivers code and wondered if anybody did a variant
analysis of this (possibly yes?) However, it seems like Kernel drivers code
for gl620a.c and lg-vl600.c (quick search) don't "Make sure that the bounds
of the metadata array are inside the SKB (and in front of the counter at
the end)."

Example from gl620a.c

https://github.com/torvalds/linux/blob/master/drivers/net/usb/gl620a.c

I think, there is no check for:

/* Make sure that the bounds of the metadata array are inside the SKB
* (and in front of the counter at the end).
*/
if (pkt_cnt * 2 + hdr_off > skb->len)
return 0;

Most likely false positive. Would be great to verify this and learn about
it.

Thanks,
Marcin

[-- Attachment #2: Type: text/html, Size: 2885 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: OOB accesses in ax88179_rx_fixup() (in USB network card driver) - variants
  2022-03-21  9:39 OOB accesses in ax88179_rx_fixup() (in USB network card driver) - variants Marcin Kozlowski
@ 2022-03-26 17:09 ` Marcin Kozlowski
  0 siblings, 0 replies; 2+ messages in thread
From: Marcin Kozlowski @ 2022-03-26 17:09 UTC (permalink / raw)
  To: kernel-hardening

[-- Attachment #1: Type: text/plain, Size: 1331 bytes --]

gl620a.c is some usb to usb computer cable, and lg-vl600.c a usb 4g dongle.
Both drivers seem NOT to use skb metadata (they take packet len and count
from skb->data directly).

Why would ASIX driver use metadata and others (those 2) don't?

Could not find any info on skb Metadata.

Thanks,

Marcin

On Mon, 21 Mar 2022, 10:39 Marcin Kozlowski <marcinguy@gmail.com> wrote:

> Hi List,
>
> Don't have much experience and knowledge in that area.
>
> Found this:
>
>
> https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?h=usb-linus&id=57bc3d3ae8c14df3ceb4e17d26ddf9eeab304581
>
> Checked out a few drivers code and wondered if anybody did a variant
> analysis of this (possibly yes?) However, it seems like Kernel drivers code
> for gl620a.c and lg-vl600.c (quick search) don't "Make sure that the bounds
> of the metadata array are inside the SKB (and in front of the counter at
> the end)."
>
> Example from gl620a.c
>
> https://github.com/torvalds/linux/blob/master/drivers/net/usb/gl620a.c
>
> I think, there is no check for:
>
> /* Make sure that the bounds of the metadata array are inside the SKB
> * (and in front of the counter at the end).
> */
> if (pkt_cnt * 2 + hdr_off > skb->len)
> return 0;
>
> Most likely false positive. Would be great to verify this and learn about
> it.
>
> Thanks,
> Marcin
>

[-- Attachment #2: Type: text/html, Size: 2490 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-26 20:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-21  9:39 OOB accesses in ax88179_rx_fixup() (in USB network card driver) - variants Marcin Kozlowski
2022-03-26 17:09 ` Marcin Kozlowski

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).