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  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:   Mon, 03 Aug 2020 15:51:44 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     baijiaju@...nghua.edu.cn
Cc:     3chas3@...il.com, linux-atm-general@...ts.sourceforge.net,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] atm: idt77252: avoid accessing the data mapped to
 streaming DMA

From: Jia-Ju Bai <baijiaju@...nghua.edu.cn>
Date: Sun,  2 Aug 2020 17:33:40 +0800

> In queue_skb(), skb->data is mapped to streaming DMA on line 850:
>   dma_map_single(..., skb->data, ...);
> 
> Then skb->data is accessed on lines 862 and 863:
>   tbd->word_4 = (skb->data[0] << 24) | (skb->data[1] << 16) |
>            (skb->data[2] <<  8) | (skb->data[3] <<  0);
> and on lines 893 and 894:
>   tbd->word_4 = (skb->data[0] << 24) | (skb->data[1] << 16) |
>            (skb->data[2] <<  8) | (skb->data[3] <<  0);
> 
> These accesses may cause data inconsistency between CPU cache and
> hardware.
> 
> To fix this problem, the calculation result of skb->data is stored in a
> local variable before DMA mapping, and then the driver accesses this
> local variable instead of skb->data.
> 
> Signed-off-by: Jia-Ju Bai <baijiaju@...nghua.edu.cn>

Applied.

Powered by blists - more mailing lists