🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #7325

Re: [PATCH net 0/2] ipmr, ip6mr: Fix several info leaks

#7325
From: Hangbin Liu
Date: Mon, 26 Oct 2026 05:59
37 lines
9566 bytes
On Sun, Oct 25, 2026 at 09:17:27AM +0200, Ido Schimmel wrote:
> ip{,6}mr_cache_report() copy the IP header of a packet that triggered an
> upcall to a report packet that is delivered to user space. The header
> is not always fully initialized or present, resulting in info leaks
> flagged by KMSAN.
> 
> Patch 1 fixes an info leak in the RTM_GETROUTE path, caused by the fact
> that ipmr_get_route() does not fully initialize the IP header of the
> packet that it creates. IPv6 does not suffer from this problem.
> 
> Patch 2 fixes info leaks triggered by packets injected into pim{,6}reg
> devices via AF_PACKET sockets. The kernel does not validate that these
> are IP packets that carry an IP header before calling
> ip{,6}mr_cache_report().
> 
> Both issues were reported by Sashiko and reproduced by me. See KMSAN
> traces in the commit messages.
> 
> As far as I can tell, all other callers call these functions from the IP
> input / output paths and therefore provide a valid IP packet, with the
> exception of ip6mr_get_route() which fully initializes the header of the
> packet it creates.
> 
> Ido Schimmel (2):
>   ipmr: fully initialize the synthetic IP header in ipmr_get_route()
>   ipmr, ip6mr: validate packets injected into the register vif on xmit
> 
>  net/ipv4/ipmr.c  | 7 +++++++
>  net/ipv6/ip6mr.c | 2 +-
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> -- 
> 2.56.0
> 

Reviewed-by: Hangbin Liu <liuhangbin@kylinos.cn>
Technical Details
Message-ID: <at7sLZYY-qkAj2Ts@fedora>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351694-linux-kernel-netdev=dewy.ru
References: <20261025071729.34967-1-idosch@nvidia.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351694-linux-kernel-netdev=dewy.ru
From: hangbin.liu@linux.dev (Hangbin Liu)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net 0/2] ipmr, ip6mr: Fix several info leaks
Date: Mon, 26 Oct 2026 13:59:09 +0800
Organization: Usenet Network
Message-ID: <at7sLZYY-qkAj2Ts@fedora>
References: <20261025071729.34967-1-idosch@nvidia.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="1235642"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:URaDhLKvn3uhzBaivNSC1pwu+Og= sha256:YuYgORimD2PvdGuNPNjYH4aIyJbV+SHfEL12ESLS+xE=
	sha1:PrlrPb8bDl0lPDHPgIJMAnQc9Sw= sha256:73dJuiS+qK1fFHognTZHcDJtYO37PU3owwm20sXaD/U=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id E19D1125B8A; Mon, 26 Oct 2026 08:59:57 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=linux.dev
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id o7Yl1qHKeQ4U;
	Mon, 26 Oct 2026 08:59:50 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-351694-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 46192125B87; Mon, 26 Oct 2026 08:59:37 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 4BC223CD56; Mon, 26 Oct 2026 05:59:27 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792994367;
	b=iDjFuI3Wp/+o0+1Im4GGAJfiXQ92iTt9w8CwJFKZqD6sLwGHoI6bcURsvnIfphwnICjl
	 V9Taa8g/wry0ziys1XnqIOOuh5cSd/GuutFlZkQ4KX8NMRxpRbgAj0fYhqJ2HnNtwNQ79
	 7LAUicDYUt7m6tQKBR/aF6SHF51BhLJ6KF8Qeig2Bdy5oYpjIgCFLtz5vjr0yG14WTp5f
	 EeAe0FH8O1JMt6QEfNNkPbr4NVJYGLKTAJ8QU53MUDF2bLY0IPq6uxnvm+/tCi/4rjRfM
	 URU4xk02ZxL2Z09IcSbGIsz9wpqCR28+1wrA1eIoc5uDYV1xR664artR2MRTKGiWjbg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792994367;
	h=X-Original-To:Received:DMARC-Filter:X-Envelope-To:DKIM-Signature:
	 X-Envelope-To:Received:X-Mizu-Trace-ID:X-Migadu-Flow:Date:From:To:Cc:
	 Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=COs/TUk4qiU7GxyHISTIlP6sMzCcAoybiHUw6sCgzug=;
	b=kemeOpi3WK3CJKdiNcYC12vzwk8gCg7a/f76Ku2IwDrDZdXb0jDdTemV8p/z80UB41Hs
	 cfF7Ts7qnGdAtdBly3NB0aok3/ILya2796OhyBJ+bWx//05cB8FWJ0+99SZ42j9pdbfc9
	 G7I03bgYNbHP5U+46uMvSrDo0Q5jJeSDaLoD+Y4auj0wzJfJ53uC8yCiR26u9E+/5rFi/
	 Yuq/EhEdEpRnq8LA4yHwGwPWof8/Ukjn9z+AJKOibQ/ga3Kr8qRlan0p0IGwnYJ2ugiRX
	 hEMA0Lc1bqUl5XsMMaWrJ0KyWEARQVSPp+qlXhCJZVn4zeoQLxD081JXWHYup7pbPZg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=al7HDrjl;
	dmarc=pass header.from=linux.dev;
	spf=pass smtp.mailfrom=linux.dev;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 23570606A321;
	Mon, 26 Oct 2026 05:59:27 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=al7HDrjl
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.49
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792994366;
	b=vx7acD8Thwq2QDk43t/OdgiUg7PgRZSFtSi09s1EWlASntxL3eepe+V3EkUK1TaFyLIw
	 E3A+lz6QCF1iROi/fEIdfs7TTbGxBVt1cpeicqfeVgIasHdwTh22GwIUMmd77j70Bzo1Y
	 LzPbW4w+WHYSp2+mNj7A0Z9ETfVLlBU8XWvTkHUDIojC5utw5SmIb4JVx+wBuLM8nfNGN
	 dnO9Jp3o/+YAJqy23OzjqpKa/zl58Yh9piQ6NDO0qamDyTgYuQDioGDGd//R0vGH9Cp5O
	 AVI1gar02FGCoqz6sFLJbWbtR3edhlG3t8JacmfcuBT8FHHWdtx06XNEm/DcTUc2yIQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792994366;
	h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received:
	 X-Mizu-Trace-ID:X-Migadu-Flow:Date:From:To:Cc:Subject:Message-ID:
	 References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=COs/TUk4qiU7GxyHISTIlP6sMzCcAoybiHUw6sCgzug=;
	b=j3pw6akQFMoWT/w3nhhbU/5LcXCVXVO6ZZ4L/nRKhr79CVlGUOpk98ZioL+vM89q0s6h
	 eCl4uPt2/x+1S0UKTmwia+hGCuGwHEuT8OYRBiz3YYaNIkOcvGKYKS/uWIagVIExHYanZ
	 NpZ4E1uDShGYIRwtJqmylYlFUKVVXjlsQsDhmQeY03FYP2lmrO5ZMj8oazS5mW4ou3oaK
	 K8WT2N0QyvOGGax0H+KLkyB59I2PljwwWqx/akLzzceG4Kej0n1hYByyfAe9QZn9htC7C
	 g4NkQ5I7G/vFle1xV8oULHR9epaBtcIB0gbFxJaBm0fJXmI/xqhaSnrt/npSaXDlQHQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=linux.dev;
	spf=pass smtp.mailfrom=linux.dev;
	dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=al7HDrjl;
	arc=none smtp.remote-ip=95.215.58.49
X-Received: from mta1.migadu.com (out-49.mta1.migadu.com [95.215.58.49])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4EB48606A31A
	for <netdev@vger.kernel.org>; Mon, 26 Oct 2026 05:59:23 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4EB48606A31A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev
X-Envelope-To: netdev@vger.kernel.org
X-DKIM-Signature: a=rsa-sha256; bh=VgV9fc/O4QmVrn4wr6/mmQ0PELV8z5X97stIcx5TCWc=;
 c=simple/simple; d=linux.dev;
 h=from:to:subject:date:message-id:mime-version:content-type; s=key1;
 t=1792994362; v=1; x=1793599162;
 b=al7HDrjl6EvqnKzBlQ2T46KnmeTKPDXd6QhTLjZcDpJHbFc3+feAwO1IL+2PzOBvGa5PMCuZ
 E+NaAMWx3U5lVRF+8BQ5pcNIxtCMhhG3pPR15CCYdh8xou3VpaStDsgQ/jpw6qvN8tSnQjQpjDY
 yNSKtksaEkKTxf91HAcAgJMQ=
X-Envelope-To: netdev@vger.kernel.org
X-Received: by mta10.migadu.com with ESMTPS id 612ba363ae14305c;
	Mon, 26 Oct 2026 05:59:22 +0000
X-Mizu-Trace-ID: 612ba363ae14305c
X-Migadu-Flow: FLOW_OUT
X-Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
	pabeni@redhat.com, edumazet@kernel.org, dsahern@kernel.org,
	horms@kernel.org, yoshfuji@linux-ipv6.org
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <20261025071729.34967-1-idosch@nvidia.com>