From nobody Thu Aug 25 15:44:58 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MD6jR0Lsjz4Zqpx for ; Thu, 25 Aug 2022 15:44:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MD6jQ65fLz4Nv3 for ; Thu, 25 Aug 2022 15:44:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MD6jQ53krztMM for ; Thu, 25 Aug 2022 15:44:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 27PFiwFe043853 for ; Thu, 25 Aug 2022 15:44:58 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 27PFiwMB043852 for bugs@FreeBSD.org; Thu, 25 Aug 2022 15:44:58 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 266036] valgrind reporting invalid read/write for setproctitle Date: Thu, 25 Aug 2022 15:44:58 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: sdalu@sdalu.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661442298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AzWhufemx8XfOXeBIa6IGZp1/QKFKqFHfVgAYcobyF8=; b=K1iLkKUkDOgDHDnD5QcLY1PUCTMlcv/yMhU6AzLy/GtJbZ3FJwkVj0DxtVYKIPRp+Ly5Qc QmHB0rcVNIcourzt6rDLqoH/PPIEkoyMz7p1CZfjP+Zn6mJ+6B/qIFl/zQsukIwwg3AVRz f2DI1pVFyqq02PDxtCWDAzB7vQLzRmLk5/PKoqgX5HjbxGm/jWGyX6gKuYch6R5CC3F86S PuAupGO9tQJIhdfyEJuWboWGvlLhrGAqyzcr01mzIiFMXa8tWV7apASglwKIrBEoRj7W93 J2qzYKzvgo975iOLNblQIkzcxorcUKXwms9kQuRtXWLkQANIRmLoe0aR5YgEKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661442298; a=rsa-sha256; cv=none; b=JYoDAxTQQT3M2yWBSSBFeLUysdYo7vzf9753SVHf78tRREAVNTz0bD0pLo0gs3QoGnjSaD kgI1AdrlkqlCNlfNS5K3c2aPBYHJ8FJOA9vrYng6v36J71XYZNNZHtmA7JXfq3ogTpmtct 5IFDv8BSXmxiVQEYs6R1/ji3E7nwr5nN/zYaw/w8KGhHApcM0Pn+AuTL9acNBdlALAMWx/ CHdWjCWgd/B3DhaEnq/jJhn27jVL5AZXreDuZIWjBKMriogOCCgGPcN393lUd4bo6JsLlS Zd+wEBvoyfzf7TjUz5co+JFbEQ+9kjrSHXyQ32NJeuPpoLvi8wbkP5Mid7FYOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D266036 Bug ID: 266036 Summary: valgrind reporting invalid read/write for setproctitle Product: Base System Version: 13.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: sdalu@sdalu.com Created attachment 236113 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D236113&action= =3Dedit valgrind log When building the following and running it under valgrind invalid read/write are reported. =3D=3D=3D spt.c =3D=3D=3D #include #include #include int main() { char *a =3D "http/caldav", *b =3D "[unix socket]", *c =3D "sdalu@sdalu.= com", *d =3D "", *e =3D "GET"; printf("%s %s %s %s %s\n", a, b, c, d, e); setproctitle("%s %s %s %s %s", a, b, c, d, e); return 0; } =3D=3D=3D spt.c =3D=3D=3D cc spt.c -o spt valgrind ./spt log (full log in attachement): =3D=3D98938=3D=3D Invalid read of size 8 =3D=3D98938=3D=3D at 0x490457C: ??? (in /lib/libc.so.7) =3D=3D98938=3D=3D by 0x4904778: setproctitle (in /lib/libc.so.7) =3D=3D98938=3D=3D by 0x2019DE: main (in /root/spt) =3D=3D98938=3D=3D Address 0x7fffffffefe0 is not stack'd, malloc'd or (rece= ntly) free'd =3D=3D98938=3D=3D=20 =3D=3D98938=3D=3D Invalid read of size 4 =3D=3D98938=3D=3D at 0x49045AE: ??? (in /lib/libc.so.7) =3D=3D98938=3D=3D by 0x4904778: setproctitle (in /lib/libc.so.7) =3D=3D98938=3D=3D by 0x2019DE: main (in /root/spt) =3D=3D98938=3D=3D Address 0x7fffffffefe8 is not stack'd, malloc'd or (rece= ntly) free'd Original discussion: https://github.com/cyrusimap/cyrus-imapd/issues/4216#issuecomment-1227421667 --=20 You are receiving this mail because: You are the assignee for the bug.=