lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 28 Jan 2022 14:29:55 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Camel Guo <camel.guo@...s.com>
Cc:     Giuseppe Cavallaro <peppe.cavallaro@...com>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>,
        Jose Abreu <joabreu@...opsys.com>,
        "David S. Miller" <davem@...emloft.net>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>, <kernel@...s.com>,
        Camel Guo <camelg@...s.com>, <netdev@...r.kernel.org>,
        <linux-stm32@...md-mailman.stormreply.com>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: stmmac: dump gmac4 DMA registers correctly

On Fri, 28 Jan 2022 16:36:42 +0100 Camel Guo wrote:
> From: Camel Guo <camelg@...s.com>
> 
> Unlike gmac100, gmac1000, gmac4 has 27 DMA registers and they are
> located at DMA_CHAN_BASE_ADDR (0x1100). In order for ethtool to dump
> gmac4 DMA registers correctly, this commit checks if a net_device has
> gmac4 and uses different logic to dump its DMA registers.
> 
> This fixes the following KASAN warning, which can normally be triggered
> by a command similar like "ethtool -d eth0":
> 
> BUG: KASAN: vmalloc-out-of-bounds in dwmac4_dump_dma_regs+0x6d4/0xb30
> Write of size 4 at addr ffffffc010177100 by task ethtool/1839
>  kasan_report+0x200/0x21c
>  __asan_report_store4_noabort+0x34/0x60
>  dwmac4_dump_dma_regs+0x6d4/0xb30
>  stmmac_ethtool_gregs+0x110/0x204
>  ethtool_get_regs+0x200/0x4b0
>  dev_ethtool+0x1dac/0x3800
>  dev_ioctl+0x7c0/0xb50
>  sock_ioctl+0x298/0x6c4
>  ...
> 
> Signed-off-by: Camel Guo <camelg@...s.com>

Can we get a Fixes tag for this? If it was always broken the Fixes tag
should point to the commit which added gmac4 support.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ