Page MenuHomeFreeBSD

PF_KEY ACQUIRE missing port and protocol info
ClosedPublic

Authored by garga on Jul 1 2015, 6:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 16, 1:36 PM
Unknown Object (File)
Feb 15 2024, 5:35 AM
Unknown Object (File)
Dec 20 2023, 12:23 AM
Unknown Object (File)
Dec 8 2023, 11:24 PM
Unknown Object (File)
Nov 30 2023, 4:45 AM
Unknown Object (File)
Oct 28 2023, 12:00 PM
Unknown Object (File)
Oct 2 2023, 2:22 AM
Unknown Object (File)
Aug 11 2023, 2:18 AM
Subscribers

Details

Reviewers
ae
gnn
Summary

Obtained from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192774
Author: john@feith.com
We are also using this patch on pfSense for 2 months


Consider an IPSEC policy such as:

spdadd 0.0.0.0/0 XXX.XXX.XXX.XXX/32[1701] udp -P out ipsec

esp/transport//require;

spdadd XXX.XXX.XXX.XXX/32[1701] 0.0.0.0/0 udp -P in ipsec

esp/transport//require;

When triggered it sends a PF_KEY ACQUIRE message that causes ISAKMP
negotiations to occur with the remote. Unfortunately the key_acquire
routine in sys/netipsec/key.c doesn't contain any code to propagate
the port / protocol information as part of the ACQUIRE message ... as
a result racoon sees an ACQUIRE message for all traffic to the remote
system and supplies that as the proposal which fails since the remote
system is only willing to protect L2TP with IPSEC ... not all traffic.

Note that RFC 2367 3.1.6 SADB_ACQUIRE says:

The address(SD) extensions MUST have the port fields
filled in with the port numbers of the session requiring
keys if appropriate.

With the supplied patch I'm able to successfully establish a L2TP protected
by IPSEC connection from FreeBSD 10-stable to a Cisco 3845 router.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

garga retitled this revision from to PF_KEY ACQUIRE missing port and protocol info.
garga updated this object.
garga edited the test plan for this revision. (Show Details)
garga added a reviewer: gnn.
garga set the repository for this revision to rS FreeBSD src repository - subversion.
ae added a reviewer: ae.
This revision is now accepted and ready to land.Jul 6 2015, 12:42 PM