Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 0BEF725B086 for ; Sun, 19 Jul 2026 14:57:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784473071; cv=none; b=XiiIbizjiLGnrHahNgVT2zwWi9n5n7zEGy91oQeWvzt/KPJokYVHzbvYabNndlDNC+mhAwbsEXGK+VI+TB2Tf4WtvIBpD/BCYC9oTmDqWsaMNgDcId7U4yd4iOtYl72WBnkcRsL+mlEm5gGKuSgPaQuB1uWu3vaH6EqS1Hd1fOE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784473071; c=relaxed/simple; bh=Wl8JMyUM3GNuUsgwxzRQURQay6dV6kOsOaEnhrMEkVI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=m1PGUzlsLLS0+ciccc3zRJZm0wS/jCZsbjylH2kJC6NYVak7PHoCjIujTVif1wgmJJpD2N+Q9ch8bLGtV9xSusWAAn+FVenEBXOmv318IeLNOl3DVmnbxJAFfHFM9ZM5IoquPWEVGBJasZVx7+CUMXSk+VilLiyfSGSCYrQB/Fk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=OSx2TybT; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="OSx2TybT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F41991F000E9; Sun, 19 Jul 2026 14:57:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784473069; bh=kIxTqe8t8i18C75RPdNoyFXyu7PHje262pysNBjjggQ=; h=From:To:Cc:Subject:Date:Reply-To; b=OSx2TybTqnYFMKGpfIXV5bvNZwX0NAgu6U6SrNLRjajAixyltU5CQF+oHpGMFvIAa rXE/cQTCYKLalgUoO7IheoXpm4O26s8BdO51I2lo12pqn6nKhn3hNZhbSOJiUBddwS NA2TMsCiP/C2dQAVkZiaKnO29nPWyU4GlgK/WQs8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-63886: scsi: target: iscsi: Validate CHAP_R length before base64 decode Date: Sun, 19 Jul 2026 16:55:46 +0200 Message-ID: <2026071940-CVE-2026-63886-48e4@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4399; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=r/fWc0ZH+pzmpyJdYFWG4SA2RcodEwi1YYQlaXtzgE8=; b=kA0DAAIRMUfUDdst+ykByyZiAGpc5WygVCSZKuWtpBXA5NC6buwxmx2R1++bemvbXc22zHtnW ohdBAARAgAdFiEE9LYMxb94wiFKMT3LMUfUDdst+ykFAmpc5WwACgkQMUfUDdst+ymOKgCglUO8 +fb3FLmndbeBV74uBznroZ0Ani5mwC+iShy+rsgmYThNauzq2lKo X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: scsi: target: iscsi: Validate CHAP_R length before base64 decode chap_server_compute_hash() allocates client_digest as kzalloc(chap->digest_size) and then, for BASE64-encoded responses, passes chap_r directly to chap_base64_decode() without checking whether the input length could produce more than digest_size bytes of output. chap_base64_decode() writes to the destination unconditionally as long as there is input to consume. With MAX_RESPONSE_LENGTH set to 128 and the "0b" prefix stripped by extract_param(), up to 127 base64 characters can reach the decoder. 127 characters decode to 95 bytes. For SHA-256 (digest_size=32) this overflows client_digest by 63 bytes; for MD5 (digest_size=16) the overflow is 79 bytes. The length check at line 344 fires after the write has already happened. The HEX branch in the same switch statement already validates the length up front. Apply the same approach to the BASE64 branch: strip trailing base64 padding characters, then reject any input whose data length exceeds DIV_ROUND_UP(digest_size * 4, 3) before calling the decoder. Stripping trailing '=' before the comparison handles both padded and unpadded encodings. chap_base64_decode() already returns early on '=', so the full original string is still passed to the decoder unchanged. The mutual CHAP path decodes CHAP_C into initiatorchg_binhex, which is kzalloc(CHAP_CHALLENGE_STR_LEN). extract_param() caps initiatorchg at CHAP_CHALLENGE_STR_LEN characters, so at most CHAP_CHALLENGE_STR_LEN-1 base64 characters reach the decoder. The maximum decoded size, DIV_ROUND_UP((CHAP_CHALLENGE_STR_LEN-1) * 3, 4), is less than CHAP_CHALLENGE_STR_LEN, so no overflow is possible there. A comment is added at the call site to document this. The Linux kernel CVE team has assigned CVE-2026-63886 to this issue. Affected and fixed versions =========================== Issue introduced in 6.0 with commit 1e5733883421495908f3b90d9d807663038b4136 and fixed in 6.1.176 with commit 82454e6f21e56ea9a0a9de7d0ff7e1dfb83e34d6 Issue introduced in 6.0 with commit 1e5733883421495908f3b90d9d807663038b4136 and fixed in 6.6.143 with commit edd06675a02376ea8347dba7c29ad982ba5b36ee Issue introduced in 6.0 with commit 1e5733883421495908f3b90d9d807663038b4136 and fixed in 6.12.93 with commit bf154c657828ed05399bca5d98cf1611bb048b12 Issue introduced in 6.0 with commit 1e5733883421495908f3b90d9d807663038b4136 and fixed in 6.18.35 with commit 4a3a19c98a8207ad08bec554703d90f2c34a8cc6 Issue introduced in 6.0 with commit 1e5733883421495908f3b90d9d807663038b4136 and fixed in 7.0.12 with commit c04e85799356120209b351a148ac2db888d5ffd9 Issue introduced in 6.0 with commit 1e5733883421495908f3b90d9d807663038b4136 and fixed in 7.1 with commit 85db7391310b1304d2dc8ae3b0b12105a9567147 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-2026-63886 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: drivers/target/iscsi/iscsi_target_auth.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/82454e6f21e56ea9a0a9de7d0ff7e1dfb83e34d6 https://git.kernel.org/stable/c/edd06675a02376ea8347dba7c29ad982ba5b36ee https://git.kernel.org/stable/c/bf154c657828ed05399bca5d98cf1611bb048b12 https://git.kernel.org/stable/c/4a3a19c98a8207ad08bec554703d90f2c34a8cc6 https://git.kernel.org/stable/c/c04e85799356120209b351a148ac2db888d5ffd9 https://git.kernel.org/stable/c/85db7391310b1304d2dc8ae3b0b12105a9567147