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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZVY9Bh5lKEqQCBrc@Antony2201.local>
Date: Thu, 16 Nov 2023 17:02:14 +0100
From: Antony Antony <antony@...nome.org>
To: Christian Hopps <chopps@...pps.org>
Cc: devel@...ux-ipsec.org, netdev@...r.kernel.org,
	Christian Hopps <chopps@...n.net>,
	Steffen Klassert <steffen.klassert@...unet.com>
Subject: Re: [devel-ipsec] [RFC ipsec-next v2 0/8] Add IP-TFS mode to xfrm

On Sun, Nov 12, 2023 at 10:52:11PM -0500, Christian Hopps via Devel wrote:
> From: Christian Hopps <chopps@...n.net>
> 
> This patchset adds a new xfrm mode implementing on-demand IP-TFS. IP-TFS
> (AggFrag encapsulation) has been standardized in RFC9347.
> 
> Link: https://www.rfc-editor.org/rfc/rfc9347.txt
> 
> This feature supports demand driven (i.e., non-constant send rate) IP-TFS to
> take advantage of the AGGFRAG ESP payload encapsulation. This payload type
> supports aggregation and fragmentation of the inner IP packet stream which in
> turn yields higher small-packet bandwidth as well as reducing MTU/PMTU issues.
> Congestion control is unimplementated as the send rate is demand driven rather
> than constant.
> 
> In order to allow loading this fucntionality as a module a set of callbacks
> xfrm_mode_cbs has been added to xfrm as well.

Hi Chris,

I have further reviewed the code and have a few minor questions, mainly 
related to handling of XFRM_MODE_IPTFS. It appears to me be either some case  
missing support or/and in a few places it should be prohibited. I have three 
types of questions:

1. missing XFRM_MODE_IPTFS support?
2. Will XFRM_MODE_IPTFS be supported this combination?
3. Should be prohibited combination with XFRM_MODE_IPTFS 

1.  Missing:  

a.  wouldn't xfrm_sa_len() need extending? 

I could not find support for XFRM_MODE_IPTFS explicitly.

However, I'm not sure how the following code is working when xfrm_sa_len is 
missing IP-TFS xfrm_sa_len:

copy_to_user_state_extra() {
    if (x->mode_cbs && x->mode_cbs->copy_to_user)
        ret = x->mode_cbs->copy_to_user(x, skb);
}

I have attached what I imagine is a fix. Check with Steffen or others if 
this is necessary.

b. esp6_init_state() and esp_init_state():
These functions do not seem to handle XFRM_MODE_IPTFS. Would they default to work with it?

2. Would xfrm4_outer_mode_gso_segment() xfrm6_outer_mode_gso_segment(): 
support XFRM_MODE_IPTFS?
These functions appear to be missing. Is it possible that you don't support GSO and GRO?

3: Shouldn't these combinations return error?

a. ipcomp and  XFRM_MODE_IPTFS
I'm guessing that ipcomp would generate an error when userspace tries to add an SA with XFRM_MODE_IPTFS.
ipcomp6_init_state()
ipcomp4_init_state()

b: In xfrm_state_construct():

if (attrs[XFRMA_TFCPAD])
    x->tfcpad = nla_get_u32(attrs[XFRMA_TFCPAD]);

-antony

View attachment "0001-xfrm-iptfs-extend-xfrm_sa_len.patch" of type "text/plain" (2568 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ