lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZxobAhwYt5I3rgNW@archie.me>
Date: Thu, 24 Oct 2024 17:01:38 +0700
From: Bagas Sanjaya <bagasdotme@...il.com>
To: Breno Leitao <leitao@...ian.org>, Jonathan Corbet <corbet@....net>,
	Akinobu Mita <akinobu.mita@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Cc: kernel-team@...a.com, Thomas Huth <thuth@...hat.com>,
	"Paul E. McKenney" <paulmck@...nel.org>,
	"Borislav Petkov (AMD)" <bp@...en8.de>,
	Steven Rostedt <rostedt@...dmis.org>,
	Xiongwei Song <xiongwei.song@...driver.com>,
	Mina Almasry <almasrymina@...gle.com>,
	Kuniyuki Iwashima <kuniyu@...zon.com>,
	Alexander Lobakin <aleksander.lobakin@...el.com>,
	Oleksij Rempel <o.rempel@...gutronix.de>,
	"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
	open list <linux-kernel@...r.kernel.org>,
	"open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next v4] net: Implement fault injection forcing skb
 reallocation

On Wed, Oct 23, 2024 at 04:38:01AM -0700, Breno Leitao wrote:
> +- fail_skb_realloc
> +
> +  inject skb (socket buffer) reallocation events into the network path. The
> +  primary goal is to identify and prevent issues related to pointer
> +  mismanagement in the network subsystem.  By forcing skb reallocation at
> +  strategic points, this feature creates scenarios where existing pointers to
> +  skb headers become invalid.
> +
> +  When the fault is injected and the reallocation is triggered, these pointers
> +  no longer reference valid memory locations. This deliberate invalidation
> +  helps expose code paths where proper pointer updating is neglected after a
> +  reallocation event.
> +
> +  By creating these controlled fault scenarios, the system can catch instances
> +  where stale pointers are used, potentially leading to memory corruption or
> +  system instability.
> +
> +  To select the interface to act on, write the network name to the following file:
> +  `/sys/kernel/debug/fail_skb_realloc/devname`
> +  If this field is left empty (which is the default value), skb reallocation
> +  will be forced on all network interfaces.
> +
>  - NVMe fault injection
>  
>    inject NVMe status code and retry flag on devices permitted by setting
> @@ -216,6 +238,19 @@ configuration of fault-injection capabilities.
>  	use a negative errno, you better use 'printf' instead of 'echo', e.g.:
>  	$ printf %#x -12 > retval
>  
> +- /sys/kernel/debug/fail_skb_realloc/devname:
> +
> +        Specifies the network interface on which to force SKB reallocation.  If
> +        left empty, SKB reallocation will be applied to all network interfaces.
> +
> +        Example usage::
> +
> +          # Force skb reallocation on eth0
> +          echo "eth0" > /sys/kernel/debug/fail_skb_realloc/devname
> +
> +          # Clear the selection and force skb reallocation on all interfaces
> +          echo "" > /sys/kernel/debug/fail_skb_realloc/devname
> +

The doc LGTM, thanks!

Reviewed-by: Bagas Sanjaya <bagasdotme@...il.com>

-- 
An old man doll... just what I always wanted! - Clara

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ