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-next>] [day] [month] [year] [list]
Message-Id: <1586877001-19138-1-git-send-email-agordeev@linux.ibm.com>
Date:   Tue, 14 Apr 2020 17:10:01 +0200
From:   Alexander Gordeev <agordeev@...ux.ibm.com>
To:     linux-kernel@...r.kernel.org
Cc:     Alexander Gordeev <agordeev@...ux.ibm.com>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        linux-mm@...ck.org
Subject: [PATCH] mm/gup: dereference page table entry using helper

Commit 0005d20 ("mm/gup: Move page table entry dereference
into helper function") wrapped access to page table entries
larger than sizeof(long) into a race-aware accessor. One of
the two dereferences in gup_fast path was however overlooked.

CC: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
CC: linux-mm@...ck.org
Signed-off-by: Alexander Gordeev <agordeev@...ux.ibm.com>
---
 mm/gup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/gup.c b/mm/gup.c
index d53f7dd..eceb98b 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -2208,7 +2208,7 @@ static int gup_pte_range(pmd_t pmd, unsigned long addr, unsigned long end,
 		if (!head)
 			goto pte_unmap;
 
-		if (unlikely(pte_val(pte) != pte_val(*ptep))) {
+		if (unlikely(pte_val(pte) != pte_val(gup_get_pte(ptep)))) {
 			put_compound_head(head, 1, flags);
 			goto pte_unmap;
 		}
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ