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 0BC483F2101; Tue, 21 Jul 2026 18:40:34 +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=1784659236; cv=none; b=D7nA2ugC9gxMg4tfV+SgxrjgodEgVwtYTrgateq8vP51iYIuM6jdEal9b0rvPEIuonxImG6vB0MsOB1yOOixvE4Mql1+gfOcCGiTfgimC/6PGwypMoTqU5DmD5YWSigPnX1n376MDeOX6pWA2DiZR0/XE8GHwljqTBr3S7InSMU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784659236; c=relaxed/simple; bh=wiZAjLP9maW/o/o0t/Uv4LuTA/SN1HsCYLr7pxtWkdQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Gq0jMM0V0YYkcSREq5SvKPXNZEGOjSktyrPiA06E935yLwPeBaItmlp20LqU8jhh4ys/yTi9nVuJU13EecGaSV6H7p8DTriD5L4zb7y9AXDl6TvrcmANEojgk62REdNs66yFPlrjliBIc0P92Vd3TCk2dKPYBhjhsdFsIeT6zzA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=bZ6QzlTC; 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="bZ6QzlTC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 33CF61F000E9; Tue, 21 Jul 2026 18:40:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784659234; bh=KTlPKHzDWPWo8O4mPYfvwNWa09bXRKcOXrZo477JNyc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=bZ6QzlTCWn7KRSr7ERk1vMLGc0e5SAr5Wibg4pkZfvEd+HSBxETBAWmbJFD/VmcEY iqmeX0Wss7qGNn8DSrn4oMsW88hPOL69QxLJLG29hIusiA9WLTv2puEJ0YSvuC4gA0 YWo6x2Naa0QWMiDJoyU6Hq6oDKpn7eSRul4K760w= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Bryam Vargas , Victor Nogueira , Jamal Hadi Salim , Jakub Kicinski Subject: [PATCH 6.18 1437/1611] net/sched: sch_multiq: Replace direct dequeue call with peek and qdisc_dequeue_peeked Date: Tue, 21 Jul 2026 17:25:53 +0200 Message-ID: <20260721152547.769600812@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152514.750365251@linuxfoundation.org> References: <20260721152514.750365251@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.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Bryam Vargas commit 54f6b0c843e228d499eb4b6bbb89df68cad9ad5d upstream. multiq_dequeue() takes a packet from a band's child with a direct ->dequeue() call after multiq_peek() peeked it. When the child is non-work-conserving the peek stashes the skb in the child's gso_skb, so the direct dequeue returns a different skb and orphans the stash, desyncing the child's qlen/backlog. With a qfq child reached through a peeking parent (e.g. tbf) this re-enters the child on an emptied list and dereferences NULL, panicking the kernel from softirq on ordinary egress. Take the packet through qdisc_dequeue_peeked(), as sch_prio already does and as sch_red and sch_sfb were just fixed to do. The helper is a no-op when the child has no stash, so a work-conserving child is unaffected. Fixes: 77be155cba4e ("pkt_sched: Add peek emulation for non-work-conserving qdiscs.") Cc: stable@vger.kernel.org Signed-off-by: Bryam Vargas Reviewed-by: Victor Nogueira Acked-by: Jamal Hadi Salim Link: https://patch.msgid.link/20260625-b4-disp-31bcb279-v1-2-85c40b83c529@proton.me Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/sched/sch_multiq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/sched/sch_multiq.c +++ b/net/sched/sch_multiq.c @@ -103,7 +103,7 @@ static struct sk_buff *multiq_dequeue(st if (!netif_xmit_stopped( netdev_get_tx_queue(qdisc_dev(sch), q->curband))) { qdisc = q->queues[q->curband]; - skb = qdisc->dequeue(qdisc); + skb = qdisc_dequeue_peeked(qdisc); if (skb) { qdisc_bstats_update(sch, skb); sch->q.qlen--;