| Message ID | 20261009135235.399263-1-stefano.babic@swupdate.org |
|---|---|
| State | Accepted |
| Headers | show
Return-Path: <swupdate+bncBD2ZDGN6SEKRBRHDUPLAMGQEJ7LU2WY@googlegroups.com>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
dkim=pass (2048-bit key;
unprotected) header.d=googlegroups.com header.i=@googlegroups.com
header.a=rsa-sha256 header.s=20251104 header.b=qUVrZASL;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com
(client-ip=2a00:1450:4864:20::33c; helo=mail-wm1-x33c.google.com;
envelope-from=swupdate+bncbd2zdgn6sekrbrhduplamgqej7lu2wy@googlegroups.com;
receiver=patchwork.ozlabs.org)
Received: from mail-wm1-x33c.google.com (mail-wm1-x33c.google.com
[IPv6:2a00:1450:4864:20::33c])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4j1SxY3FdRz1xyX
for <incoming@patchwork.ozlabs.org>; Sat, 10 Oct 2026 00:53:19 +1100 (AEDT)
Received: by mail-wm1-x33c.google.com with SMTP id
5b1f17b1804b1-4a1721559b4sf53211625e9.1
for <incoming@patchwork.ozlabs.org>;
Fri, 09 Oct 2026 06:53:19 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1791553992; cv=pass;
d=google.com; s=arc-20260327;
b=KwWtRoHaRW9c0kp/Zi426T4G8pxeEPnkpbRS+RJAVd8fuCCAR6FF7s01/MdyQUiOr8
uzafWnVDxqT94dtT/7Y3+yhYNxU3hhUZZas5bkOYv55fbPVZICSv2wgYzzIzAxEo+Gnq
9MBDyKYhI27FG043kIsG7Ostl9TaH4EOWlu0DrK3IMbUzcQsi1LSav9zzYkIopdgc/VO
xfyGNbbApNXgjaYijhfk9alELcy/ZLGI/JBpamGRWN7zVIyo9wR9nElANlzFFizRYHli
/cE507ur42Yvjaq2HI6UJumKXUY9tnpM4yWQKBUklkQJULuzYmXjs7c2L58dHpu2tXEZ
wOhQ==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20260327;
h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
:list-id:mailing-list:precedence:ui-outboundreport:mime-version
:message-id:date:subject:cc:to:from:sender:dkim-signature;
bh=u2LE3tqo+7iO7a/LNTbKm8mpT8VXWXrnDf24OzSJMFI=;
fh=pmTYSi6V+uZalJDrxDqoxcL11l2xQqBg9uS1jWzhiy8=;
b=NH5/qgNkhkAYMknaHtQpn4EMGzhUvg6acpmJsvYgkT9KEyG8+ygpjLe7Jkf6n5JV+D
eYNGFzvWnhMis4b1BXWrdlia7all3bYL2JBad95Uotjgy5+TvqEngeNNv3av0d/ZEjFt
6bcQ6kvsNIGal73Tj+AFQcZ8YIJZfzFU772TjCIY93raRKh2RHzVVKFrcz+dzhnu5I86
3q0QSXwMHexaH+xVGtt6kop8oyMV7TrsBg5hLjAcx0g1j99AoZ0w1FjrdDBxPEpOrG8w
VKdyKLdTZEsf9rnpG4occInlg6NiBvLHw7Bu8kmyy3gnitMyaKVTqOkIIgjrEyveV1id
l/VA==;
darn=patchwork.ozlabs.org
ARC-Authentication-Results: i=2; gmr-mx.google.com;
dkim=pass header.i=@swupdate.org header.s=s1-ionos header.b=GPHkoM6e;
spf=pass (google.com: domain of stefano.babic@swupdate.org designates
212.227.126.130 as permitted sender)
smtp.mailfrom=stefano.babic@swupdate.org;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=swupdate.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=googlegroups.com; s=20251104; t=1791553992; x=1792158792;
darn=patchwork.ozlabs.org;
h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
:list-id:mailing-list:precedence:content-type
:x-original-authentication-results:x-original-sender
:ui-outboundreport:mime-version:message-id:date:subject:cc:to:from
:sender:from:to:cc:subject:date:message-id:reply-to:content-type;
bh=u2LE3tqo+7iO7a/LNTbKm8mpT8VXWXrnDf24OzSJMFI=;
b=qUVrZASLvJPV4jecrsx7HN0JejF4ra/7QS1tQZj4gNAdxdOfbBudFVqvsOZfQBbOiH
7Z8QPdQ4DCS4icSYPpM7WazFtUsgOin/DSAzkeHkS2vlBO+r6ZiqJM6ccp2uqqaBvKsu
qYUaZzqGtNvxm4sNxsDdxvTkrDu8ogxu9tcW1FKZT5C+9ptwRy4KuKqop/RTV78l5IqX
G1i4CrVS50dBbTsJCB4Fzp8McPLG9aVh+ydVzXFKA1y+gPOx+JORDMswJdnlwEtOgWHH
UpdIj40Oh+ecAdS79GH0gxSMFG/Rj2ueHzd0JCErxzn2MXULJUDp1jBM1wbQKbCP6Bif
GlJA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1791553992; x=1792158792;
h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
:x-spam-checked-in-group:list-id:mailing-list:precedence
:content-type:x-original-authentication-results:x-original-sender
:ui-outboundreport:mime-version:message-id:date:subject:cc:to:from
:x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=u2LE3tqo+7iO7a/LNTbKm8mpT8VXWXrnDf24OzSJMFI=;
b=ZH4OMFviDuJzPzh3YKXGoK1D4KkDwG92jAe2tQ384C+aK1jQew4cA/7fbpVAIupVPV
8VJkE+/qVrXiOLm7Vf083E4bADeFizqFKOoyWSmANp57CqqZmvcQDkMzlDXLBsNMjo/N
KcZtAZxjbUuLWJOWXLxhDIS/ELJVkeOiIuBwNcM1H6G/SJoUiiF4kXC3WxEbwFKp6T3u
/Xd0BpqM+ZId9KsNarUaz3+XhSua4/UCwoFkbt3pOeaZfQ/bNj7/H6FCrgMaGk9MPyip
b9wXX7W2kBOeTDHrtRsGrfiXaV6+FBPSPaBxK7O8viy8yeAAWDyyuBq5HtLRpkdJMWUQ
1ASw==
Sender: swupdate@googlegroups.com
X-Forwarded-Encrypted: i=2;
AKwUvBxVcqeb098iqg02RCzbRpW/ULBhsMYoujKob3LoT3YyyeyXsWxofQE8sFK0eAMtv8pxZUM3CF28JA==@patchwork.ozlabs.org
X-Gm-Message-State: AFuF++k43iFhuOSPiBWYvQEsnwVpD97Ro5ljyvOmhywj6NJjdkdzxmGZ
E5+21Z1VlQS2YZWWKNenrtCrvAp0tepKeeYUiBRRwutLIOXZ2ReYWpVY
X-Received: by 2002:a05:600c:4594:b0:49d:1fa8:b266 with SMTP id
5b1f17b1804b1-4a18e4d6ac3mr35707015e9.26.1791553991837;
Fri, 09 Oct 2026 06:53:11 -0700 (PDT)
X-BeenThere: swupdate@googlegroups.com;
h="ATskLdfQuHVDkqFRNHs/z3fCT2XaiCePEEjL/EbEdBRyFHfXFg=="
Received: by 2002:a05:600c:3b82:b0:49f:cd53:b9e7 with SMTP id
5b1f17b1804b1-4a18e25def9ls3553905e9.2.-pod-prod-05-eu; Fri, 09 Oct 2026
06:53:07 -0700 (PDT)
X-Received: by 2002:a05:600c:354a:b0:49c:d019:70c5 with SMTP id
5b1f17b1804b1-4a18e3ef23cmr36415365e9.0.1791553987147;
Fri, 09 Oct 2026 06:53:07 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1791553987; cv=none;
d=google.com; s=arc-20260327;
b=Yu7x1xA1FAguhzx0LU41tth6GMspCduK8i2RIYA6FtA44j4Z2uO0Vjwg+uyIvfKG0h
hhUBjeJVTkIG0umQ1JwKznbBL991hwuH0t/K7aT4p6SWNlS5DHINmhyUqyava510wM2e
RUGE8dEs+J642eejU0EN5hR/vDliecpWuRkZWBGBeBCvKnJVmIno/B3cBvsuaLzdV6lj
AujNvnP/bhkQYypRqF0F3nXQG1SXB7KT37xTuBhK9bdHnLyhgkc1Q0+7o0eXNFIBJKPh
B9lAmrR7TYYvY2X0UyQ0Iy5Jj4GbzDF4/XILfqb25ZpioZAzC9Eg5qeAOXe4B2hphSgE
ry9w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20260327;
h=ui-outboundreport:content-transfer-encoding:mime-version:message-id
:date:subject:cc:to:from:dkim-signature;
bh=7eUfmtTwL2m0Lfvih9Gf6cidgK1AjqmkrBffEpgsYFs=;
fh=TiEWcqMcKpHk5s7uErzpntoONrNfOXwKpI5P8bIlggk=;
b=h6jS9yskyoiF/QYkDSAONcnLQn2gCHAx+EwpGwE8p5XulQiwM/1N0H+FeJFwggOR7g
4VAx3F6jpEqgWzE4RIsoUlU5r1bovl28d62GuCA7GuRs53LfuYh+kabmoqtPQzzlRJaa
Lix8yxILUjUmYOMlO9NXVAi8VP8bWNG9wvPKww6A8uaiKm5Fv99tmyPla8KaMElUgzM3
xKTokdBWXLPVBcAsy1rIlW8zvI7zYbVJHDHuNZFwdGFVw4joO5WYbttxztqvL58wPfiQ
piucQp+DmtvrHiwh4I8QcQkpwBbEKwW0FoVymoMY7dZOkC3U/lTIx8DE7IV/qx4LxrqG
nZLg==;
dara=google.com
ARC-Authentication-Results: i=1; gmr-mx.google.com;
dkim=pass header.i=@swupdate.org header.s=s1-ionos header.b=GPHkoM6e;
spf=pass (google.com: domain of stefano.babic@swupdate.org designates
212.227.126.130 as permitted sender)
smtp.mailfrom=stefano.babic@swupdate.org;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=swupdate.org
Received: from mout.kundenserver.de (mout.kundenserver.de. [212.227.126.130])
by gmr-mx.google.com with ESMTPS id
ffacd0b85a97d-48db94f078fsi29903f8f.4.2026.10.09.06.53.07
for <swupdate@googlegroups.com>
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Fri, 09 Oct 2026 06:53:07 -0700 (PDT)
Received-SPF: pass (google.com: domain of stefano.babic@swupdate.org
designates 212.227.126.130 as permitted sender) client-ip=212.227.126.130;
X-UI-Sender-Class: 55c96926-9e95-11ee-ae09-1f7a4046a0f6
Received: from client.hidden.invalid by mrelayeu.kundenserver.de (mreue010
[213.165.67.97]) with ESMTPSA (Nemesis) id 1N1x6X-1wV1ND05Fp-012s7y; Fri, 09
Oct 2026 15:53:06 +0200
From: Stefano Babic <stefano.babic@swupdate.org>
To: swupdate@googlegroups.com
Cc: Stefano Babic <stefano.babic@swupdate.org>
Subject: [swupdate] [PATCH] security: openssl: check all signer names
Date: Fri, 9 Oct 2026 15:52:35 +0200
Message-ID: <20261009135235.399263-1-stefano.babic@swupdate.org>
X-Mailer: git-send-email 2.53.0
MIME-Version: 1.0
X-Provags-ID: V03:K1:jLyTXzkSlj9DuXy/VSItB6FyM0iys7s7uVImny8Hqcyp0eCtGCW
2RnvZnMRjgfejL619t461BTdYAJUp4JA1O4OSNx6XLVUFGu0wTlRMuSkzvTxJqp5sY+lguK
EQNfek4tIPcB6vg+6P9pEu0JNHjVjvyCvH4/VahQi/CW/6znnS1ET4djzDUGD1nn6iIZVDO
yQ8fOkuNt+u/CVcZj/x6Q==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:RnKz7wQ8te0=;X8tBP/yU+vMJVuApAyRyH+cficF
PIz2lmTPyYakMkyVOonjvIbJr+JgwDL9kwQpQHHokr6un3Ii2YySF9J67hPXnDXZGQ1BkGkcu
HVnkhGq5plChd5C0cEtlBsLK/2tdVHKkHgTmSPELdXeJN9HgbC/tCc0jWmupA39l49DRYcw6Y
Hw5fezMy5BExClf7L/btjr/0PrGE+wuIvq0XSTJNRmFAHv5I49eE2QlfREWlmTzzML4knQuSu
T7oo9xR4sxValIRLXitJluWO2Ug8+t2yWyV4a1JraQNMfxDtOtD1FDzqooBVR7aMnICqN5tmT
8WBW7rcPx26J0fS02O7NtN+/ypAMBlsCWfy5blELqRHn5U6vJha7sTz6FNijUX3kRNlCCP687
PnIvgDm7jkfpDrnl6r8TlP94C5OrfWWC8pekLRWJtvb3zsqvyeX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NyBxYY9/BttiX
hD1WwXf0PJu3+Z65diYrFcHklwxn8kRe0+TsN52h+eyCrHFU7lJh9Q5aaO49gOWrlWfUFwfE+
9XXP2KRpCJDc93O3/mwTUb4OHFlGvaHHe
X-Original-Sender: stefano.babic@swupdate.org
X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass
header.i=@swupdate.org header.s=s1-ionos header.b=GPHkoM6e; spf=pass
(google.com: domain of stefano.babic@swupdate.org designates 212.227.126.130
as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=swupdate.org
Content-Type: text/plain; charset="UTF-8"
Precedence: list
Mailing-list: list swupdate@googlegroups.com;
contact swupdate+owners@googlegroups.com
List-ID: <swupdate.googlegroups.com>
X-Spam-Checked-In-Group: swupdate@googlegroups.com
X-Google-Group-Id: 605343134186
List-Post: <https://groups.google.com/group/swupdate/post>,
<mailto:swupdate@googlegroups.com>
List-Help: <https://groups.google.com/support/>,
<mailto:swupdate+help@googlegroups.com>
List-Archive: <https://groups.google.com/group/swupdate
List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>,
<mailto:swupdate+subscribe@googlegroups.com>
List-Unsubscribe:
<mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>,
<https://groups.google.com/group/swupdate/subscribe>
|
| Series |
security: openssl: check all signer names
|
expand
|
diff --git a/crypto/swupdate_cms_verify_openssl.c b/crypto/swupdate_cms_verify_openssl.c index 3a18e70b..ab4d255e 100644 --- a/crypto/swupdate_cms_verify_openssl.c +++ b/crypto/swupdate_cms_verify_openssl.c @@ -306,9 +306,12 @@ static int check_signer_name(CMS_ContentInfo *cms, const char *name) if (CMS_SignerInfo_cert_cmp(si, crt) == 0) { ret = check_common_name( X509_get_subject_name(crt), name); + if (ret) + goto out_check_signer; } } } +out_check_signer: sk_X509_pop_free(crts, X509_free); return ret;
Avoid to bypass the signer name. If a certificate of the same CA is compromised, the attacker can sign with the compromised certificate even if was not intended for updating the device. Because the result is overwritten on each match, an attacker can append a certificate carrying the expected CN after the compromised signer and the check passes. This happens in the bad cases where a global PKI is used. No impact if the trust store contains only update-signing certificates. Signed-off-by: Stefano Babic <stefano.babic@swupdate.org> --- crypto/swupdate_cms_verify_openssl.c | 3 +++ 1 file changed, 3 insertions(+)