From nobody Mon Dec 12 14:40:56 2022 X-Original-To: dev-commits-src-all@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 4NW47D51T3z4kXWq; Mon, 12 Dec 2022 14:40:56 +0000 (UTC) (envelope-from git@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 4NW47D4KSMz4LSx; Mon, 12 Dec 2022 14:40:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670856056; 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=gExHFbmJFAeFCaY44rAyMcOeH+OMzCuNLj3YvvD/QeY=; b=BfcSBI8XniBdRY3zEGZz2dugu9d5gpy/IdZlgx/ugDI/natLAVUGOyZJOhp+pTHnhO+QOk P1hkQfpwuHoH7UuMzR2yGofLF/NuUJdAnHyTiYm+4uTNNroeMUTTnnnM/FNb70nsQtAv09 HDm/CDOPcmPZH/3DkdLmbnDlrwUzPIpU3wft+585XNlQJPsvJL/vVEdtFXfldA7Zbuklao L3+9G/AkjJfRTK9Y8wRB4s/JwnpOF54+9FkPGnk8vkAG9d5AJuz0bjQeDJlob6p+2LXeZb 2bObMCBkVMbVRsa3qkL/+WaqhB8twpmrthCnn1/DYeBwLjIU/MnksCjUa5OOWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670856056; 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=gExHFbmJFAeFCaY44rAyMcOeH+OMzCuNLj3YvvD/QeY=; b=RwSf0qlQAoX8sG8xZI4eQ4NC8kOekcsOOgvTPlPw6HksxQIklcBfW/57ZtoufybdIdBIgB NGit477uXKEeUMtTVK5ZIUmFBagmKqoGYele7xvoGuREuiyA42ZTds11FXGOYLoAA7gNE2 oWJMQUMuVxyqyixRCdpTMC7YW0fY5soRbXZ/1Qlkp/Nu3SNDIFGON5iNdz+xXXyd0+IDjl d5X+ytiz4LpUNjYyFjN/LU2+/fOhqiBxR/w0XY4kDJez6WG+wDPzgMowII/Uah0oe6Az+l ZlAqPogrmO22FeIGSFX0LIS6uuMGQgUnIZUHa0m9Ie2pOVWZZGS8osJoeNvnMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1670856056; a=rsa-sha256; cv=none; b=xhewapvKn19orH/mR81GY7UnskqmINSq3Rmb9hIPd8JqyhLriOrbhF+WCo315PJ0Qh/vWu mwSfswIlMcrDphhiWDcp2tML4Cy9Z0QK8oDeZJfUOGtHvmnVZOLIgVVJu2uA8+52F9drhV OeS4QKakpRXE9GK/m06vbgGWq3V0RdOeBUIyk2rzpn5dL3wb+WZaP4+4qZAoyePh1ezSx1 Kc6gLyeOsFDcwYXq1py230ucb3fUJ6o6C20mvJsGr13qnmZAaM8306o11XHLMRw7MK383r 1AxI+aGPPo8RuQ12mDvelohbNOciNBO4USiQX6AS6QU/KQ8FKXxNLCosQCGpwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4NW47D3R1pzdS9; Mon, 12 Dec 2022 14:40:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2BCEeuip080258; Mon, 12 Dec 2022 14:40:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BCEeuhS080257; Mon, 12 Dec 2022 14:40:56 GMT (envelope-from git) Date: Mon, 12 Dec 2022 14:40:56 GMT Message-Id: <202212121440.2BCEeuhS080257@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: ed8706c340f6 - stable/13 - heimdal: kadm5_c_get_principal() should check return code List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ed8706c340f63a98ad49ec3f0212c4ee36022095 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=ed8706c340f63a98ad49ec3f0212c4ee36022095 commit ed8706c340f63a98ad49ec3f0212c4ee36022095 Author: Cy Schubert AuthorDate: 2022-12-09 14:06:04 +0000 Commit: Cy Schubert CommitDate: 2022-12-12 14:40:37 +0000 heimdal: kadm5_c_get_principal() should check return code kadm5_c_get_principal() should check the return code from kadm5_ret_principal_ent(). As it doesn't it assumes success when there is none and can lead to potential vulnerability. Fix this. Reported by: rtm@csail.mit.edu (cherry picked from commit f6d5d31cd5d5b409851b3bf82c41a477a643a486) --- crypto/heimdal/lib/kadm5/get_c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/heimdal/lib/kadm5/get_c.c b/crypto/heimdal/lib/kadm5/get_c.c index 3c31a515b2f3..3cbfefdbf334 100644 --- a/crypto/heimdal/lib/kadm5/get_c.c +++ b/crypto/heimdal/lib/kadm5/get_c.c @@ -77,7 +77,7 @@ kadm5_c_get_principal(void *server_handle, ret = tmp; krb5_clear_error_message(context->context); if(ret == 0) - kadm5_ret_principal_ent(sp, out); + ret = kadm5_ret_principal_ent(sp, out); krb5_storage_free(sp); krb5_data_free (&reply); return ret;