From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0951F3853560; Fri, 24 Jun 2022 07:23:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0951F3853560 From: "fweimer at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug malloc/29283] assert when ptrace(PTRACE_POKEDATA) on allocated buffer Date: Fri, 24 Jun 2022 07:22:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: malloc X-Bugzilla-Version: 2.35 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fweimer at redhat dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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: cc flagtypes.name resolution bug_status 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: Fri, 24 Jun 2022 07:23:00 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29283 Florian Weimer changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fweimer at redhat dot com Flags| |security- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #2 from Florian Weimer --- (In reply to russkubik from comment #0) > $ BUFSIZ=3D72 ./tracer 0x5555555592a0 ./tracee This is a 64-bit address, suggesting a 64-bit process. But your code does this: #define WORD uint32_t src =3D (WORD *)buf; dst =3D (WORD *)tracee_addr; for (size_t i =3D 0; i < buf_size / sizeof(WORD); i++) { if (ptrace(PTRACE_POKEDATA, child, dst, *src) =3D=3D -1= ) { handle_error("ptrace(PTRACE_POKEDATA)"); } src++; dst++; } WORD needs to be 64 bits. --=20 You are receiving this mail because: You are on the CC list for the bug.=