Bug 122562 - [ipsec] IPsec AH tunneled packet mis handling?
Summary: [ipsec] IPsec AH tunneled packet mis handling?
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 7.0-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-08 12:10 UTC by susan.lan
Modified: 2017-12-31 22:23 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description susan.lan 2008-04-08 12:10:00 UTC
	In the very beginning of ip6_input():

#ifdef IPSEC
  /*
   * should the inner packet be considered authentic?
   * see comment in ah4_input().
   */
  if (m) {
      m->m_flags &= ~M_AUTHIPHDR;
      m->m_flags &= ~M_AUTHIPDGM;
  }
#endif

Consider the case: a packet is encrypted as AH tunneled, and FreeBSD is the end point of the tunnel. After it tore off the outer IPv6 header, the mbuf will be inserted to NETISR again. Then ip6_forward() will be called again to process the packet. However, in ipsec6_in_reject(), the packet's source and destination will match the SP entry. Since ip6_input() has truned off the flag M_AUTHIPHDR and M_AUTHIPDGM, the packet will be dropped.

I don't think with the codes AH tunnel could work properly.

Fix: 

I think the flag should be kept!
How-To-Repeat: 	Set IPsec rules as AH tunnel for the 2 PCs; send ICMP echo request from
one end of the tunnel to the other end. However, the echo reply will never be returned since the packet is not successfully sent out.
Comment 1 Bjoern A. Zeeb freebsd_committer freebsd_triage 2008-04-08 13:25:52 UTC
Responsible Changed
From-To: freebsd-bugs->bz

mine.
Comment 2 Bjoern A. Zeeb freebsd_committer freebsd_triage 2014-05-18 06:02:41 UTC
Responsible Changed
From-To: bz->gnn

I shall not use bugzilla (at least until we will have a CLI).
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:58:47 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped