summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/openssh/openssh/0001-upstream-include-destination-constraints-for-smartca.patch
blob: b4e7ce7ef693d640a356b8b4820f3c8b33c8c15c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From 91889b5a3e7554af474a21ce8e1ffd3eb1542f06 Mon Sep 17 00:00:00 2001
From: "djm@openbsd.org" <djm@openbsd.org>
Date: Thu, 9 Mar 2023 06:58:26 +0000
Subject: [PATCH] upstream: include destination constraints for smartcard keys
 too.

Spotted by Luci Stanescu; ok deraadt@ markus@

OpenBSD-Commit-ID: add879fac6903a1cb1d1e42c4309e5359c3d870f

CVE: CVE-2023-28531

Upstream-Status: Backport [54ac4ab2b53ce9fcb66b8250dee91c070e4167ed]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 authfd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/authfd.c b/authfd.c
index 76e48aab..dca8e55b 100644
--- a/authfd.c
+++ b/authfd.c
@@ -665,7 +665,7 @@ ssh_update_card(int sock, int add, const char *reader_id, const char *pin,
     struct dest_constraint **dest_constraints, size_t ndest_constraints)
 {
 	struct sshbuf *msg;
-	int r, constrained = (life || confirm);
+	int r, constrained = (life || confirm || dest_constraints);
 	u_char type;
 
 	if (add) {
-- 
2.37.1