From mboxrd@z Thu Jan 1 00:00:00 1970 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 AAC0D47141F; Tue, 21 Jul 2026 19:50:19 +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=1784663420; cv=none; b=SlhN9HkaV7eDKBfK/gsVduYKUsaTQEnxhtd1TB8t8ug+V1ZCHKlhSbjPB4mC8Az15RWb0Em1yF2YxxgIyBop0AnjvYG4mnzgpnqdQri8UNkJspN2LnznAGVw34NEVSA0rjxYXxRRatlzYGPWKkP/fh+r2RYXTyvdLtaSPOcRIWM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784663420; c=relaxed/simple; bh=GN2fRlsGJD8t66dfTx26H1DgSGLcNT0E9LgVqt7B5fE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JZGuQ1Z7WBCYs99nKb54LDVaoRRIEqBARh+Kmyh8Rf0tks+dy1dlVSi/hzBLsWK3Y1NEVQLZIkpZDdtUK82ZMPUc004MVFNVxLs+1EbcyDyLwdO2DH74G5D8TOdFKOMYgWRMXa0pSY/SfdxCObfQcywSN0y38JlL31dRkdA/HTk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FIQJPcU9; 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="FIQJPcU9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D3E81F000E9; Tue, 21 Jul 2026 19:50:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784663419; bh=cCTtQH8JdZKeF68PgowBh9TLKR2Y6x5VOGd16E9ZCTU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=FIQJPcU9lJToaHEBOicZzQlVHmp2zqtAadkNQp57cHObNWqaDVhZOVjvBpIbAL14v 2aV0CalZI9wYjNB41AGh85xYBVqy1wx8wt/3BxooxWYwQNNQ5Tbu3BmGTCrl7FUOE8 0HNA+ahSh6+Mx4YqJ21+PevqOGHNOHwERKxQ2w0I= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yuan Tan , Xin Liu , Yong Wang , Ren Wei , Jakub Kicinski Subject: [PATCH 6.12 0815/1276] net: ife: require ETH_HLEN to be pullable in ife_decode() Date: Tue, 21 Jul 2026 17:20:58 +0200 Message-ID: <20260721152504.304134451@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152446.065700225@linuxfoundation.org> References: <20260721152446.065700225@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yong Wang commit 9406f6012b7343661efb516a11c62d4db2b62f75 upstream. ife decode may return after making only the outer IFE header and metadata pullable. The caller then passes the decapsulated packet to eth_type_trans(), which expects the inner Ethernet header to be accessible from the linear data area. With a malformed IFE frame, the inner Ethernet header may still be shorter than ETH_HLEN in the linear area, which can lead to a crash in the original code. Fix this by extending the pull check in ife_decode() so that the inner Ethernet header is also guaranteed to be pullable before returning. Fixes: ef6980b6becb ("introduce IFE action") Cc: stable@vger.kernel.org Reported-by: Yuan Tan Reported-by: Xin Liu Signed-off-by: Yong Wang Signed-off-by: Ren Wei Link: https://patch.msgid.link/20260610183814.1648888-2-n05ec@lzu.edu.cn Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/ife/ife.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/ife/ife.c +++ b/net/ife/ife.c @@ -79,7 +79,7 @@ void *ife_decode(struct sk_buff *skb, u1 if (unlikely(ifehdrln < 2)) return NULL; - if (unlikely(!pskb_may_pull(skb, total_pull))) + if (unlikely(!pskb_may_pull(skb, total_pull + ETH_HLEN))) return NULL; ifehdr = (struct ifeheadr *)(skb->data + skb->dev->hard_header_len);