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 9A44B2D0C63 for ; Tue, 13 Jan 2026 15:30:18 +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=1768318218; cv=none; b=kyHChcZwfzMuoOU2ClNReIX8cXVcdSXXWT2iloTWXUkPYRghcwuHXsKNX6OGpYN3w7qvNVbAm78olkrncRmQp2D/Y0/fv3Uf+NVjK4K+e/HCOn4PNSZuX1x1aE2KD7CGj/IL4mQCHbGyCtffJry8pUYfkXFxs4Hy7rdhFfV2lMs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768318218; c=relaxed/simple; bh=uwh3+/yqUBdePpDSMOr3qdcWEwfgsfEIpxy62VrJbZ8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=S4SY8ewUjRpyxc1r3IQd8KI06D4ExrOwHdaET3bYimKGTqWBk/twvLAYkurglt1HUE5XBdPSLRKzXm5RYUEt7Hjk8+kEOXqPPkGnRHo0oFzSr/CYYAB51FzvYM0y7i0YPIG7/ruMQbHufxClA9A8p5LX3o0k7JW0A+WCFRhbMOo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=N5sH+ZJ/; 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="N5sH+ZJ/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D7E9C116C6; Tue, 13 Jan 2026 15:30:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1768318218; bh=uwh3+/yqUBdePpDSMOr3qdcWEwfgsfEIpxy62VrJbZ8=; h=From:To:Cc:Subject:Date:Reply-To:From; b=N5sH+ZJ/EYuEWbgID6PEd3nANvmb3G77+vLJFjD74rDcGLWEVqxZQRWK2hhy2cuJX 3Yd3aAUJlNaMbLcru7nXjhnGvgf1wr5j2AUQq2nK9Ka1EdNuHr/HGg9gWiwVlZ7+Ll LRbHRvhJx7YY5i1A+MT4+38iYWxYN/dMzxvVViA8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-68786: ksmbd: skip lock-range check on equal size to avoid size==0 underflow Date: Tue, 13 Jan 2026 16:29:12 +0100 Message-ID: <2026011303-CVE-2025-68786-d145@gregkh> X-Mailer: git-send-email 2.52.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=2254; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=SdGh6wkr2oukPxjSTXvXmQYwUjdWjcq8YepojnIqPtU=; b=owGbwMvMwCRo6H6F97bub03G02pJDJlpKfufLNXLuVp8adauqa9aBb6nrEoy2yrKKy60ajlr1 u9vAmrqHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjARfx2G+b4Vf9/wzjquYvN+ 3c7Edw63hOO8HjLM4Vncvm7r0tLvfYq5JibeZhMbK+7PAwA= 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: ksmbd: skip lock-range check on equal size to avoid size==0 underflow When size equals the current i_size (including 0), the code used to call check_lock_range(filp, i_size, size - 1, WRITE), which computes `size - 1` and can underflow for size==0. Skip the equal case. The Linux kernel CVE team has assigned CVE-2025-68786 to this issue. Affected and fixed versions =========================== Fixed in 6.1.160 with commit 52fcbb92e0d3acfd1448b2a43b6595d540da5295 Fixed in 6.6.120 with commit da29cd197246c85c0473259f1cad897d9d28faea Fixed in 6.12.64 with commit a6f4cfa3783804336491e0edcb250c25f9b59d33 Fixed in 6.18.3 with commit 571204e4758a528fbd67330bd4b0dfbdafb33dd8 Fixed in 6.19-rc1 with commit 5d510ac31626ed157d2182149559430350cf2104 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-68786 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/server/vfs.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/52fcbb92e0d3acfd1448b2a43b6595d540da5295 https://git.kernel.org/stable/c/da29cd197246c85c0473259f1cad897d9d28faea https://git.kernel.org/stable/c/a6f4cfa3783804336491e0edcb250c25f9b59d33 https://git.kernel.org/stable/c/571204e4758a528fbd67330bd4b0dfbdafb33dd8 https://git.kernel.org/stable/c/5d510ac31626ed157d2182149559430350cf2104