Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing IP Protocol 97 for Strongswan IPSEC VPN #424

Closed
gstreeter opened this issue Nov 10, 2013 · 5 comments
Closed

Missing IP Protocol 97 for Strongswan IPSEC VPN #424

gstreeter opened this issue Nov 10, 2013 · 5 comments

Comments

@gstreeter
Copy link

I've updated a Pi to kernel 3.10.18+ #585 with rpi-update and found that Strongswan 5.1.1 IPSEC VPN no longer functions. This works fine on the current 3.6.11+ #538 kernel.

The following error message appears in the IPsec log file:

"received netlink error: Address family not supported by protocol (97)"

Looks like there something missing out of the kernel 3.10.18+ build that was present in the 3.6.11 version.

@popcornmix
Copy link
Collaborator

From here:
http://wiki.strongswan.org/projects/strongswan/wiki/KernelModules
I think these are needed:
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_MULTIPLE_TABLES=y

I'll add in next update (probably later today)

@gstreeter
Copy link
Author

It was suggested in the Pi forum that the ipip module was missing from the build which indeed it is. I was able to get this to be built by adding the module option under the menuconfig item Network Support -> Networking options -> IP: tunneling

The additional modules that are loaded when I start the Strongswan IPSEC VPN server on the 3.6.11 kernel are listed below:

xfrm4_tunnel
tunnel4
ipcomp
xfrm_ipcomp
esp4
ah4
af_key

@popcornmix
Copy link
Collaborator

Can you try after updating?

@gstreeter
Copy link
Author

Hi,

I've just updated to #587 and this has fixed the issue. Thanks for the prompt turn-around.

Gary

@popcornmix
Copy link
Collaborator

Good to hear.

spezi77 added a commit to spezi77/android_kernel_htc_qsd8k that referenced this issue Dec 27, 2014
+ apply IP configs as proposed here: raspberrypi/linux#424 (comment)

Change-Id: I5e82bfc6f093fd3a1b9f8a42cbe1bf08faee112f
popcornmix pushed a commit that referenced this issue May 19, 2021
[ Upstream commit f77bd54 ]

while testing re-assembly/re-fragmentation using act_ct, it's possible to
observe a crash like the following one:

 KASAN: maybe wild-memory-access in range [0x0001000000000448-0x000100000000044f]
 CPU: 50 PID: 0 Comm: swapper/50 Tainted: G S                5.12.0-rc7+ #424
 Hardware name: Dell Inc. PowerEdge R730/072T6D, BIOS 2.4.3 01/17/2017
 RIP: 0010:inet_frag_rbtree_purge+0x50/0xc0
 Code: 00 fc ff df 48 89 c3 31 ed 48 89 df e8 a9 7a 38 ff 4c 89 fe 48 89 df 49 89 c6 e8 5b 3a 38 ff 48 8d 7b 40 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 75 59 48 8d bb d0 00 00 00 4c 8b 6b 40 48 89 f8 48
 RSP: 0018:ffff888c31449db8 EFLAGS: 00010203
 RAX: 0000200000000089 RBX: 000100000000040e RCX: ffffffff989eb960
 RDX: 0000000000000140 RSI: ffffffff97cfb977 RDI: 000100000000044e
 RBP: 0000000000000900 R08: 0000000000000000 R09: ffffed1186289350
 R10: 0000000000000003 R11: ffffed1186289350 R12: dffffc0000000000
 R13: 000100000000040e R14: 0000000000000000 R15: ffff888155e02160
 FS:  0000000000000000(0000) GS:ffff888c31440000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 CR2: 00005600cb70a5b8 CR3: 0000000a2c014005 CR4: 00000000003706e0
 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
 Call Trace:
  <IRQ>
  inet_frag_destroy+0xa9/0x150
  call_timer_fn+0x2d/0x180
  run_timer_softirq+0x4fe/0xe70
  __do_softirq+0x197/0x5a0
  irq_exit_rcu+0x1de/0x200
  sysvec_apic_timer_interrupt+0x6b/0x80
  </IRQ>

when act_ct temporarily stores an IP fragment, restoring the skb qdisc cb
results in putting random data in FRAG_CB(), and this causes those "wild"
memory accesses later, when the rbtree is purged. Never overwrite the skb
cb in case tcf_ct_handle_fragments() returns -EINPROGRESS.

Fixes: ae372cb ("net/sched: act_ct: fix restore the qdisc_skb_cb after defrag")
Fixes: 7baf242 ("net/sched: cls_flower add CT_FLAGS_INVALID flag support")
Reported-by: Shuang Li <[email protected]>
Signed-off-by: Davide Caratti <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants