From nobody Mon Dec 12 14:41:30 2022 X-Original-To: dev-commits-src-branches@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 4NW47t3RMDz4kXTT; Mon, 12 Dec 2022 14:41:30 +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 4NW47t30p4z4M1x; Mon, 12 Dec 2022 14:41:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670856090; 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=42wzzqlHN1X53RXRAYlpOP2Mm0Q0wLXcdtkUK78DAyU=; b=BMEZt+O8Djku6Cm7tqknYexGG6kIjKhTPfl/p66dr/B6M8BtEQXIJYCrNBWxyGDHplREKR 8rKp3S0p8OYS5NE91wst97AZItcU21b8yGtPw8EMY5yjMvY22zvjiqtmsUbC7RgPggbPTs 3F8AiqXWMiTiymDYht8KnH6pqikNQRkbvWvHUoyDBxyfk9Ci2C1KUAixR1dcr08OFBFZd2 0ZmeyaN5Vv9z9ciWSxJ5C9QWetLTWtNFW8yFPBxhMZSllPFxVPaaHjTjL401DUYGHCIPFm tx/GUF3duPwWXcIEQZPFdrZABrh3OWX56SY8oQ8/XS8BowOkR7l8r38YNK1owQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670856090; 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=42wzzqlHN1X53RXRAYlpOP2Mm0Q0wLXcdtkUK78DAyU=; b=f21BjdbfeSmgRUHOfmS8xJJS0G5bSZ6Jg6eCYoaqlfppt08D9BbAQRcA+fiIpSoL2HlG16 HuCxGyq1ytxdfFYsy+G6c2Nb6LBrEO17bFzJfxD5Isq4ppePOrWCJSBWK+7unPFZSSTgYj PH2v/6xN6jEGGm6rRhUEBpiMEgqchWTscczE8APPn2LiTvCCiak7RrxHTsPlnoNLvhygLC dW00xL54IapvtqWKhxZioPQho6JN80OOnFTd/IiDYW9ys/kZcJ5ldVqVMRGw/jb6Aq6yP3 coZBml6qhJNOOBu3WoSa7O0DLZSJpm6SMX/RGdeomxSsz951x2gN+QivI7yJGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1670856090; a=rsa-sha256; cv=none; b=dwAE7UdpEKRE5bHSUL3gCCUKsmTD3QGcCihyGOIT7q4rbygpzIbAI+bYZR+hRSLm0d+dcJ CbfIH81MNuN0VpPtGgLCI8xTgreg8gZrJOiri/cRomee2sIQYs3xUGUPfRdFu/SfT5X/lU HUjcmv6sXzimS8npo6G3+Setr7ZDtLvpZ+tdNhYfmkMnmpr3YF+5cQ3hBGaWfrgj4cXHq3 2OoW/6Zox1Lt2PsBzbulo284uiw6eEytrtdql361bITeT3quIOJjcasyjtRxFAckfoqS0t B9DdiGXHE5uGZ046QYlC7DTiMc5utiX77/y66ZIHkheaJT/tyzQC+6r555W7Lg== 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 4NW47t23M6zdSJ; Mon, 12 Dec 2022 14:41:30 +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 2BCEfU4R082478; Mon, 12 Dec 2022 14:41:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BCEfUB7082466; Mon, 12 Dec 2022 14:41:30 GMT (envelope-from git) Date: Mon, 12 Dec 2022 14:41:30 GMT Message-Id: <202212121441.2BCEfUB7082466@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: a8970f585cdf - stable/12 - heimdal: Properly ix bus fault when zero-length request received List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/12 X-Git-Reftype: branch X-Git-Commit: a8970f585cdfca3ce8b22a4921a9490b592ef4ff Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=a8970f585cdfca3ce8b22a4921a9490b592ef4ff commit a8970f585cdfca3ce8b22a4921a9490b592ef4ff Author: Cy Schubert AuthorDate: 2022-12-08 23:22:43 +0000 Commit: Cy Schubert CommitDate: 2022-12-12 14:41:17 +0000 heimdal: Properly ix bus fault when zero-length request received Zero length client requests result in a bus fault when attempting to free malloc()ed pointers within the requests softc. Return an error when the request is zero length. This properly fixes PR/268062 without regressions. PR: 268062 Reported by: Robert Morris (cherry picked from commit 3deefb0d147d71047a13ec2328b1b721da2ce256) --- crypto/heimdal/kadmin/server.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crypto/heimdal/kadmin/server.c b/crypto/heimdal/kadmin/server.c index 19dfd89d521a..5e01277fe45b 100644 --- a/crypto/heimdal/kadmin/server.c +++ b/crypto/heimdal/kadmin/server.c @@ -473,6 +473,8 @@ v5_loop (krb5_context contextp, ret = krb5_read_priv_message(contextp, ac, &fd, &in); if(ret == HEIM_ERR_EOF) exit(0); + if (in.length == 0) + ret = HEIM_ERR_OPNOTSUPP; if(ret) krb5_err(contextp, 1, ret, "krb5_read_priv_message"); doing_useful_work = 1;