From nobody Mon Apr 15 15:43:05 2024 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 4VJBJp3R01z5Gq3r for ; Mon, 15 Apr 2024 15:43:06 +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 4VJBJp2N3Dz4pd7 for ; Mon, 15 Apr 2024 15:43:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713195786; a=rsa-sha256; cv=none; b=JcsWyjl4MTbSAjPK3vadkqm9mUN/Osi7x1zVNCNZog3PUhvLEVJLJDYQoC4kbKTNQU1q66 tONDO7Zr6Bslc6M8HTXvaFFtlaEF14Kp6IyhwaLGIfrRn+JvAR9xS3+OZ7Cg+SOUhhwI03 xXQtyVNi882RlB+v1tX9BS/TYtK2s7oc27DmzLYs75jILm34B4M3uph6rbPdebBiF5Pd7y U9wF9rPWBBgRYx7G+7eXqMIakN/bDzBb7PYWvkbu//8fp/NA+3Sdd4JA83+PJmtlht7eVD D+fE1os6hBoQUh2CDgo+EhdWy8DY92f43TDlPtbT00z4d5ZLvMOV9ywAAZh1lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713195786; 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: in-reply-to:in-reply-to:references:references; bh=YX9zDvBOVPppXfCOHRZiDizt4oiP6dKUg4/aWeq36DI=; b=yHBKD4BKHts6d6OdRkKCoGjxJmoTYDuOr8WfqelDdbBKZKPghQIC0k2Hfu9yiZT7RZVVGa GQl1l8L16PsgrGOLICgFp1YRGyL5nHDtKfukAHNDR9atjlPffTEbMbhhIf1dnvxkYau7kc lksAU081+eyG5KZGL5QgYTOGGdi1DdBcJ4ioEdKpCrKPP31H4XgKojdxVOk8UZBP7XIcoo DZ1X7BaXB3Zm2hxZutgXVxbc500qeVBRnBZ544HNd7AVH36/7qGi26NW5uIgZDdeyNTDt3 y1cchxiCIcU45eLJVHrtk+eslcNhu2vjP1+C2Q8krV1M7dNzpk1eSrNB8+BebQ== 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 4VJBJp1hwrz14gG for ; Mon, 15 Apr 2024 15:43:06 +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 43FFh6O5063437 for ; Mon, 15 Apr 2024 15:43:06 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 43FFh6Ga063436 for bugs@FreeBSD.org; Mon, 15 Apr 2024 15:43:06 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 253759] sendmail does not quote GECOS information for From header Date: Mon, 15 Apr 2024 15:43:05 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 12.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: michaelo@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: 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 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D253759 Michael Osipov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |michaelo@FreeBSD.org --- Comment #1 from Michael Osipov --- So the bug is truly in sendmail: https://github.com/freebsd/freebsd-src/blob/303dea74c2cb3a41fba455fce857799= 3e637c3da/contrib/sendmail/src/srvrsmtp.c#L5470-L5481 The fullname/GECOS is neither basically quoted nor escaped. In old ssmtp it is at least quoted: https://salsa.debian.org/debian/ssmtp/-/blob/master/ssmtp.c?ref_type=3Dhead= s#L463-473 In postfix it is handled perfectly: https://github.com/vdukhovni/postfix/blob/a6993c3a48ebc3ac6cefd9913dab4b8c2= 3b66ab8/postfix/src/smtp/smtp_proto.c#L1436-L1438, it does even escape double quotes in full names. sendmail has this idiom: 863 if (!rfc822_string(p)) 864 { 865 /* 866 ** Quote a full name with special characters 867 ** as a comment so crackaddr() doesn't destroy 868 ** the name portion of the address. 869 */ 870 871 p =3D addquotes(p, e->e_rpool); 872 } from ./src/util.c These spots needs to be analyzed: osipovmi@deblndw011x:~/var/Projekte/freebsd/src/contrib/sendmail (main =3D) $ grep -r q_fullname . ./src/alias.c: a->q_fullname =3D NULL; ./src/parseaddr.c: a->q_fullname =3D=3D N= ULL ? "(none)" : a->q_fullname); ./src/recipient.c: if (a->q_fullname =3D=3D NU= LL) ./src/recipient.c: a->q_fullname =3D ctladdr->q_fullname; ./src/recipient.c: new->q_fullname =3D sm_rpool_strdup_x(e->e_rpool, ./src/sendmail.h: char *q_fullname; /* full name if kno= wn */ ./src/srvrsmtp.c: if (a->q_fullname =3D=3D NULL) ./src/srvrsmtp.c: message(fmtbuf, a->q_fullname, a->q_user, MyHostName); --=20 You are receiving this mail because: You are the assignee for the bug.=