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 6A5BC3C769B for ; Mon, 10 Aug 2026 12:02:18 +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=1786363339; cv=none; b=t7mkxvBT/R9h6F2a3/fmqGCxJi153zif2plGa8iH1nfrfQjWFjAI0xZtOZgfo7fdXWXNiNEcL8V4Wsyy/lOlZjQdBnG4l6gtkyh1B9ZmeSbIpjDTGuRhmI0hd4HZPaotxklnTUUnpLtED09lQibjQEbC2iMpHMo6LBpkbQjSAD0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786363339; c=relaxed/simple; bh=X0Dc6sHon9GYT//E1aopRFmq0C3A9BNuDDok4j2TjLA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=uCU5WT39yd11QCR/RgJppr/Uy4DpOcp/34tymVpLXw6HGQLJHHlork1FyDT3PjLDhlduwKwzAEtmPECr+o1GbCsiLa6QAO0aOnyj/Vip5gYpCa0rQCTehQRiiotYwCXAgOd8TnDujV4zFXlOKfstLoaPhSVjdESjv+91KiP2Ve8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=AzlDEheX; 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="AzlDEheX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C99E51F000E9; Mon, 10 Aug 2026 12:02:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786363338; bh=oy0hCq8e9gwHU1uOWQVAdUdqv87MDlBJo+Xg1zDkP9A=; h=From:To:Cc:Subject:Date:Reply-To; b=AzlDEheX5O+xK2O/oF8HJ7Pb+5u3NSr261pGFqQ0QBBFMh1tKDqslMNzs2Kv5kTdy YQ4zKhRCWbf+BcoREXqklbnguhjNYRWKWzKBh/vfUQPR9SKQ17HbfJL8hVpQ6erAHT yn+EEdt5f8tOYEpA5ZXP/F1iyLMY74mVmc+5QcDQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-68124: mctp: serial: handle zero-length frames to prevent rx buffer overflow Date: Mon, 10 Aug 2026 13:57:21 +0200 Message-ID: <2026081056-CVE-2026-68124-575b@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=4744; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=4oAkew9ap9GmwpsSZuWzSCBAFCkryEO+LOhhEMT6fnE=; b=owGbwMvMwCRo6H6F97bub03G02pJDFmVezqm2Dot6d1d9rtreU5C4JHJshYrdfJizn75sNyNr 2PJ+Q/2HbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRtI8M8/MsZincvreqK8Xs ztUSCcO2TJ1FgQwLOmr1VyYLrbFra7Ke3zLz26qWO/b/AA== 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: mctp: serial: handle zero-length frames to prevent rx buffer overflow The MCTP serial receive state machine reads a frame length byte in mctp_serial_push_header() case 2 and validates it upper-bound-only: if (c > MCTP_SERIAL_FRAME_MTU) { dev->rxstate = STATE_ERR; } else { dev->rxlen = c; dev->rxpos = 0; dev->rxstate = STATE_DATA; ... } A length of zero passes this check, so rxlen is set to 0 and the state machine advances to STATE_DATA. In mctp_serial_push() STATE_DATA, the incoming byte is stored and rxpos incremented before the terminator is dev->rxbuf[dev->rxpos] = c; dev->rxpos++; dev->rxstate = STATE_DATA; if (dev->rxpos == dev->rxlen) { dev->rxpos = 0; dev->rxstate = STATE_TRAILER; } With rxlen == 0 the "rxpos == rxlen" terminator can never fire (rxpos is already 1 on the first data byte), so subsequent bytes are written past the end of the fixed 74-byte rxbuf, which is the last member of the netdev private area. Every following data byte is an attacker-controlled 1-byte out-of-bounds heap write, and the overflow continues until a frame (0x7e) or escape byte resets the parser -- effectively unbounded. Reaching this requires CAP_NET_ADMIN to attach the N_MCTP line discipline and bring the resulting mctpserialN netdev up, after which the bytes arrive via the tty receive path. Route a zero-length frame straight to STATE_TRAILER instead of STATE_DATA. The trailer/framing bytes are still consumed, and the frame resolves to a zero-length skb that the MCTP core rejects; the parser never enters STATE_DATA with rxlen == 0, so the out-of-bounds write can no longer occur. KASAN, on a frame of 0x7e 0x01 0x00 followed by data bytes (before this change): UBSAN: array-index-out-of-bounds in drivers/net/mctp/mctp-serial.c:370 index 74 is out of range for type 'u8 [74]' BUG: KASAN: slab-out-of-bounds in mctp_serial_tty_receive_buf Write of size 1 at addr ... by task kworker/u16:0 mctp_serial_tty_receive_buf tty_ldisc_receive_buf flush_to_ldisc Allocated by task 152: alloc_netdev_mqs mctp_serial_open v2: route zero-length frames to STATE_TRAILER instead of STATE_ERR so the trailer/framing bytes are still consumed (Jeremy Kerr). Found by 0sec automated security-research tooling (https://0sec.ai). The Linux kernel CVE team has assigned CVE-2026-68124 to this issue. Affected and fixed versions =========================== Issue introduced in 5.17 with commit a0c2ccd9b5ad0a9e838158404e041b5a8ff762dd and fixed in 6.6.148 with commit 36dc6d6964a3b90411cc7944cd9b8b6f67b9807b Issue introduced in 5.17 with commit a0c2ccd9b5ad0a9e838158404e041b5a8ff762dd and fixed in 6.12.101 with commit 68819427bc07eca7963a9e8be19e5272cc29186c Issue introduced in 5.17 with commit a0c2ccd9b5ad0a9e838158404e041b5a8ff762dd and fixed in 6.18.42 with commit f80ba170d7b3a44e3d244a2c8e06031d61bf3b23 Issue introduced in 5.17 with commit a0c2ccd9b5ad0a9e838158404e041b5a8ff762dd and fixed in 7.1.6 with commit 06a6b606129c8a25cd457760f5370f3ff01fe05d Issue introduced in 5.17 with commit a0c2ccd9b5ad0a9e838158404e041b5a8ff762dd and fixed in 7.2-rc5 with commit 793b9b729f1e8de57be8c8daf1a9838be96cabed 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-68124 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/net/mctp/mctp-serial.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/36dc6d6964a3b90411cc7944cd9b8b6f67b9807b https://git.kernel.org/stable/c/68819427bc07eca7963a9e8be19e5272cc29186c https://git.kernel.org/stable/c/f80ba170d7b3a44e3d244a2c8e06031d61bf3b23 https://git.kernel.org/stable/c/06a6b606129c8a25cd457760f5370f3ff01fe05d https://git.kernel.org/stable/c/793b9b729f1e8de57be8c8daf1a9838be96cabed