Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C97B1F5FA for ; Sun, 19 Jan 2025 10:19:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737281948; cv=none; b=tk0kCAxHYC49A+qff3FV5H0OJeWL4Pl5qoLQEaqgZFUHt5lKjk0uCAcNZdgUJaq8e9/1IZvqNWrJ5ndHdtBQEGAMCPKG3CNKd7B1cB1/RENdkkRKDT81f5wyFkK/JBa3TunCbUR/CZtjnx7zgLjFIA3EypJtpAtr4tapfqtmKmo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737281948; c=relaxed/simple; bh=ZJoSqu8B21h+p2POJoihBRIUeZG2SQFgwUW5qvdvoZ0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=LhsF8/U9AZYhe58mnjrqJv7DEzsPCrNhg6vlD+G4BcdDJpII7vQMOX+TuWfejUuU64h6GiP9NfZWTKlwV+We5tOW/GeBCI5d8zrLuWp2KGVk+uEDBQUFhVDUs7blaqJkJ02ljlqrDUrrvlnJtJX/LIU0MNQDul9wDO0wpAKawLA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=svBUCTZv; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="svBUCTZv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 428B2C4CED6; Sun, 19 Jan 2025 10:19:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1737281947; bh=ZJoSqu8B21h+p2POJoihBRIUeZG2SQFgwUW5qvdvoZ0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=svBUCTZv6x4ef63Kz4BGGm5es2JEZHSvGFdxY8yN+VcekX0zWJ+SWzpYhM26VO514 4ju662lEqIXqszMONQFJqr5eGtUnkk+vbBJ9Cyv8Ruin18APpDXk7xlfBAL82rwm+H UuMM/8iYiJ4LShmzQ2mHaFAc9xeg55gdQR0OUWfs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21646: afs: Fix the maximum cell name length Date: Sun, 19 Jan 2025 11:17:55 +0100 Message-ID: <2025011945-CVE-2025-21646-8f6e@gregkh> X-Mailer: git-send-email 2.48.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=3070; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ZJoSqu8B21h+p2POJoihBRIUeZG2SQFgwUW5qvdvoZ0=; b=owGbwMvMwCRo6H6F97bub03G02pJDOk9Fz3D+MQeeNsqvV6y/eLV5F09oXdf3z/huSzN8INXe 5eHibNIRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEwkeC/Dgqap5p8nbnyp5uhw 3+3BnUC2/5sTgxjmu1udmu/9wuXa4f0bo7aW72w/+eLiMQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: afs: Fix the maximum cell name length The kafs filesystem limits the maximum length of a cell to 256 bytes, but a problem occurs if someone actually does that: kafs tries to create a directory under /proc/net/afs/ with the name of the cell, but that fails with a warning: WARNING: CPU: 0 PID: 9 at fs/proc/generic.c:405 because procfs limits the maximum filename length to 255. However, the DNS limits the maximum lookup length and, by extension, the maximum cell name, to 255 less two (length count and trailing NUL). Fix this by limiting the maximum acceptable cellname length to 253. This also allows us to be sure we can create the "/afs/./" mountpoint too. Further, split the YFS VL record cell name maximum to be the 256 allowed by the protocol and ignore the record retrieved by YFSVL.GetCellName if it exceeds 253. The Linux kernel CVE team has assigned CVE-2025-21646 to this issue. Affected and fixed versions =========================== Issue introduced in 5.8 with commit c3e9f888263bb4df11cbd623ceced02081cb2f9f and fixed in 6.1.125 with commit aabe47cf5ac5e1db2ae0635f189d836f67024904 Issue introduced in 5.8 with commit c3e9f888263bb4df11cbd623ceced02081cb2f9f and fixed in 6.6.72 with commit 7673030efe0f8ca1056d3849d61784c6caa052af Issue introduced in 5.8 with commit c3e9f888263bb4df11cbd623ceced02081cb2f9f and fixed in 6.12.10 with commit 7922b1f058fe24a93730511dd0ae2e1630920096 Issue introduced in 5.8 with commit c3e9f888263bb4df11cbd623ceced02081cb2f9f and fixed in 6.13-rc7 with commit 8fd56ad6e7c90ac2bddb0741c6b248c8c5d56ac8 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2025-21646 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: fs/afs/afs.h fs/afs/afs_vl.h fs/afs/vl_alias.c fs/afs/vlclient.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/aabe47cf5ac5e1db2ae0635f189d836f67024904 https://git.kernel.org/stable/c/7673030efe0f8ca1056d3849d61784c6caa052af https://git.kernel.org/stable/c/7922b1f058fe24a93730511dd0ae2e1630920096 https://git.kernel.org/stable/c/8fd56ad6e7c90ac2bddb0741c6b248c8c5d56ac8