From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 54CDA39450DC; Wed, 8 Apr 2020 14:09:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 54CDA39450DC From: "wdijkstr at arm dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/25620] Signed comparison vulnerability in the ARMv7 memcpy() (CVE-2020-6096) Date: Wed, 08 Apr 2020 14:09:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.3.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wdijkstr at arm dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security+ X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2020 14:09:28 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25620 --- Comment #16 from Wilco --- (In reply to Szabolcs Nagy from comment #15) > note that memmove calls memcpy with overlapping > src and dst (if dst < src). >=20 > and on an aarch64 kernel a 32bit arm executable with > mmap(0, -1U/2 + 4097, PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0); > can succeed. >=20 > so the bug can be triggered by code using mmap and memmove correctly. >=20 > however i think relying on memcpy crashing on an overflowed > size to mitigate bugs in user code is a weak protection. > (and in general we should not guarantee that memcpy accesses > all pages in the specified range: there may be a memcpy > syscall in the future for large copies with whatever semantics > in case of ub) Still we should have a new test that checks every string function which has= a size_t input, using a positive test if the huge mmap succeeds and a negative test checking for a crash. That should flush out any other cases across all targets. --=20 You are receiving this mail because: You are on the CC list for the bug.=