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 2934213699F for ; Wed, 17 Apr 2024 09:44:21 +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=1713347062; cv=none; b=D3zkOic0dGq7+gT5FLiIqcH4o1rT5LIZT6HONZyaJTCRMAnDn42zLZZqEUaYtdZK/JxtndU4O0rlSpSMOeHxIbQhwnmG9UMwGj06hhVwfo+j1dnK4RmKhAMfaFZ1KoN+i1AEVkl3Xq1h92Ax/QJVhEwd3rTV1YhQApmWSqoBZ18= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713347062; c=relaxed/simple; bh=F4DhiHq5wMQpJSe+V8DJk4I0RZQqduBdYfIZhYJp8o4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=T1GZvhawDMfgJX0KBw3IhyGgcpjnz0ZHxfCLkBns3yuVlsvg4wgnUj8r87mt4J2f0c5qTkdtUQUy1L6+BjYBCkTudWlxyYcEf1YBKzaYbeR89xPU7OVbobZzGt0rtaoFz3sPAMdNQFVNh52IZw6tsqJTrCSdWVseSnfS5RDwM+g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=LeNJIStP; 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="LeNJIStP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66F10C072AA; Wed, 17 Apr 2024 09:44:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1713347061; bh=F4DhiHq5wMQpJSe+V8DJk4I0RZQqduBdYfIZhYJp8o4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=LeNJIStPda9d6VQ3DlCsxm+QtPIhU6h6MHtD7zyIRTtygSq9zap2Q0HtCkNwxnH5t MbGhcPl25fQVSsTW/4Bajbg2qt3DAAGcxAQoBIlHI8VT5S8ENfkeKwBOxjYKcLgpoz 1VCSiFzERPSXRoFyz45cNzOgJ49wu7w5pmdp4KR0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26828: cifs: fix underflow in parse_server_interfaces() Date: Wed, 17 Apr 2024 11:44:11 +0200 Message-ID: <2024041703-CVE-2024-26828-b2be@gregkh> X-Mailer: git-send-email 2.44.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=2363; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=F4DhiHq5wMQpJSe+V8DJk4I0RZQqduBdYfIZhYJp8o4=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnyMx+fdDIN47Z+rXZq/4zv5arXzqse7EzTz3hQG9f04 Nudx2mnO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAir/YyzDN0zMlPO6V3mJ91 jaASt9oVj7NMtQzz67t/aXi/nPHnzEyn5iPK7yeoT2qYBwA= 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: cifs: fix underflow in parse_server_interfaces() In this loop, we step through the buffer and after each item we check if the size_left is greater than the minimum size we need. However, the problem is that "bytes_left" is type ssize_t while sizeof() is type size_t. That means that because of type promotion, the comparison is done as an unsigned and if we have negative bytes left the loop continues instead of ending. The Linux kernel CVE team has assigned CVE-2024-26828 to this issue. Affected and fixed versions =========================== Issue introduced in 4.18 with commit fe856be475f7 and fixed in 6.1.79 with commit 7190353835b4 Issue introduced in 4.18 with commit fe856be475f7 and fixed in 6.6.18 with commit f7ff1c89fb6e Issue introduced in 4.18 with commit fe856be475f7 and fixed in 6.7.6 with commit df2af9fdbc4d Issue introduced in 4.18 with commit fe856be475f7 and fixed in 6.8 with commit cffe487026be 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-2024-26828 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/smb2ops.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/7190353835b4a219abb70f90b06cdcae97f11512 https://git.kernel.org/stable/c/f7ff1c89fb6e9610d2b01c1821727729e6609308 https://git.kernel.org/stable/c/df2af9fdbc4ddde18a3371c4ca1a86596e8be301 https://git.kernel.org/stable/c/cffe487026be13eaf37ea28b783d9638ab147204