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 3D6F1314B9F for ; Fri, 19 Sep 2025 15:28:10 +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=1758295691; cv=none; b=mzovvNUraoLKPyaICHPNTPf2oGnz1D8LK5HczlN1eOi8JG9j0IuYbN3CYR5ykDxuUCz20xZ0Mjf+2FBanej6xzr6/i1Pzy/rUXosJLwO6lVNjO92s/UYbSQd6oci89xfNYp3fZUvs8oqwf4ooAMt7VQSp3VM/l7mUVYASMdHqsQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758295691; c=relaxed/simple; bh=KmEst7uAi3SJbshEkzHCEPEvfOHlDx5bVUeB2PC/FTk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Wfi2oX8dEtS125pS6hfFXFbZFY3Ls3LkrhwtiLJ9ibqgkCPWL2WPNvDotwY4ODu49fMvtXqIBONnt5e8W2/rhalo/QbONwNIf7jjBbqMdDhFMt85Trm0LtvFVcLM4iez8jUMb+CQBjP5QAEJAVWYdo607m+NuQcXkJ88gl8bhaI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Xd+z05dL; 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="Xd+z05dL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 681D7C4CEF5; Fri, 19 Sep 2025 15:28:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758295690; bh=KmEst7uAi3SJbshEkzHCEPEvfOHlDx5bVUeB2PC/FTk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Xd+z05dLjjDK70zXmQXi+KlBod6D2LDqezn9tVxsykG5S6rLNcMFMbU/ynffqIoYq IjqWj+SN/+CoXxwtiQAR8OKoCfehro6JdmFSGlILe21rJ7QkXzKzPrZwj/7pqQ3TIt L06R+TGQvaU2Izv2rnuoqa1luvTT0R0UXM05x33A= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-39838: cifs: prevent NULL pointer dereference in UTF16 conversion Date: Fri, 19 Sep 2025 17:28:02 +0200 Message-ID: <2025091902-CVE-2025-39838-2a5d@gregkh> X-Mailer: git-send-email 2.51.0 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=2509; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=PtzL6GVhJvnLjhVBkPWPgDiJ+WLQ7TGMixZLrdPqBr0=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlny5pOLui49nrloUj56X55P/69MN9ddzlyk2C0d+rU/ U7zj+ov6IhlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJVKximGcrkVMf+7GiNEnt hdMkG+uHcuaBbxgW7DO+KCmQenIi77bO/eZZz0KU32qZAQA= 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: cifs: prevent NULL pointer dereference in UTF16 conversion There can be a NULL pointer dereference bug here. NULL is passed to __cifs_sfu_make_node without checks, which passes it unchecked to cifs_strndup_to_utf16, which in turn passes it to cifs_local_to_utf16_bytes where '*from' is dereferenced, causing a crash. This patch adds a check for NULL 'src' in cifs_strndup_to_utf16 and returns NULL early to prevent dereferencing NULL pointer. Found by Linux Verification Center (linuxtesting.org) with SVACE The Linux kernel CVE team has assigned CVE-2025-39838 to this issue. Affected and fixed versions =========================== Fixed in 6.1.151 with commit 65b98a7e65e7a8f3894d8760cd194eaf20504c99 Fixed in 6.6.105 with commit 1cfa5dd05847137f0fb3ce74ced80c0b4858d716 Fixed in 6.12.46 with commit 1f797f062b5cf13a1c2bcc23285361baaa7c9260 Fixed in 6.16.6 with commit 3c26a8d30ed6b53a52a023ec537dc50a6d34a67a Fixed in 6.17-rc5 with commit 70bccd9855dae56942f2b18a08ba137bb54093a0 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-39838 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/smb/client/cifs_unicode.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/65b98a7e65e7a8f3894d8760cd194eaf20504c99 https://git.kernel.org/stable/c/1cfa5dd05847137f0fb3ce74ced80c0b4858d716 https://git.kernel.org/stable/c/1f797f062b5cf13a1c2bcc23285361baaa7c9260 https://git.kernel.org/stable/c/3c26a8d30ed6b53a52a023ec537dc50a6d34a67a https://git.kernel.org/stable/c/70bccd9855dae56942f2b18a08ba137bb54093a0