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 409B2253F13; Fri, 5 Jun 2026 01:52:24 +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=1780624350; cv=none; b=AoYdADyexM1rmX0VwO0HZUMwLlxGdevOA7nQq1278vxdHMXXIITGB1dMM2Claq/R6VJH7BoOloitAMiSdSA5yXpWK8Y4/Cj5we1vFSEMa/ew7FleS+QcE+tkUBU07u8NauM1DAyhGPOx2XY2kj88l5L9H+OPOzx8usyx0oKuPE4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780624350; c=relaxed/simple; bh=XdNGHLzzmLPQLk5Np/UxW7RO8EfDraHy3LUeRDy4IFk=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XK0C6GADWLhF5NqCuC37OAflOE02qu54Lt5K3qmueu/jJFvxtcLRKKYBP2iRD+8RNa9Puv+ywobxDMAPnLaygIcNG6hG+XTVoPJSN/rc7JtaxIs/I5p2SitV1YIJWHmlmat2DtFqT2JEj86uc1cL7R6TitMvqGJN7/knvdJ7rIA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RMI9oC9W; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RMI9oC9W" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AEB1D1F00893; Fri, 5 Jun 2026 01:52:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780624344; bh=zYZKQzJ7zPWE8IzZN6QipGkw8psLqfyPxmzoQEcOgD0=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=RMI9oC9WkY4Vd3JhcbLzodR4vkSfN1AOUPQ1Y1xPvQEhB9E0f7J2IhtI+dPwwxfUo HPM1Mb4t0fCtCW6FzTJJ0Fn9JMD7zInl5p12tWQSu90hxDg2/6xBaULX42qVRpxruP WyDyV8+2PT3n1U7TdbjJzHZ034mzIdT52x7lF6QG7N/JnnujDaETGwgfZTVNu87fEL h9Wm0AYmBmBAws+3CIsW8yaPKsvrqpShR1J4e9GU6uKV9VlLCVwGqWI7VNFyqPW48L 3mMt4S+taTAlIfip+xmT1Me+n/Pw8WGthEsx+RnzWa5yB00vwoamZCsMM9QvhqeX9B sJlHBeCQg34Zg== Date: Thu, 4 Jun 2026 18:52:22 -0700 From: Jakub Kicinski To: Pedro Falcato Cc: Vlastimil Babka , Harry Yoo , Andrew Morton , "David S. Miller" , Eric Dumazet , Paolo Abeni , linux-hardening@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Hao Li , Christoph Lameter , David Rientjes , Roman Gushchin , Simon Horman , Jason Xing , Kuniyuki Iwashima Subject: Re: [PATCH 2/2] net: skb: isolate skb data area allocations into a separate bucket Message-ID: <20260604185222.794ea329@kernel.org> In-Reply-To: <20260602183122.747759-3-pfalcato@suse.de> References: <20260602183122.747759-1-pfalcato@suse.de> <20260602183122.747759-3-pfalcato@suse.de> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 2 Jun 2026 19:31:22 +0100 Pedro Falcato wrote: > SKB data area allocations (as done from alloc_skb()) use kmalloc(). > These allocations can be variably sized and their contents can be more > or less controlled from userspace, which makes them useful for attackers > that want to overwrite a use-after-free'd object from the same kmalloc slab > (which often just requires the sizes to roughly match into the same kmalloc > bucket). [0] is an easy example of an exploit that uses netlink skb > allocation to target another similarly-sized accidentally freed object. > > While other mitigations like CONFIG_RANDOM_KMALLOC_CACHES exist, these are > probabilistic. Use the existing kmem buckets API to further isolate these > allocations in a guaranteed fashion, when CONFIG_SLAB_BUCKETS=y. No idea on the merits but from networking point of view: Acked-by: Jakub Kicinski