Bug 436267 - Cannot create an SA with ESP enc only or AH only
Cannot create an SA with ESP enc only or AH only
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
ia32e All
high Severity medium
: rc
: ---
Assigned To: Thomas Graf
Martin Jenner
Depends On:
Blocks: 253764
  Show dependency treegraph
Reported: 2008-03-06 04:06 EST by Herbert Xu
Modified: 2014-06-18 04:29 EDT (History)
4 users (show)

See Also:
Fixed In Version: RHBA-2008-0314
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-21 11:11:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Fix digest_null support (819 bytes, patch)
2008-03-06 04:08 EST, Herbert Xu
no flags Details | Diff
[IPSEC]: Use hmac(digest_null) instead of digest_null (926 bytes, patch)
2008-03-26 22:48 EDT, Herbert Xu
no flags Details | Diff

  None (edit)
Comment 1 Herbert Xu 2008-03-06 04:08:37 EST
Created attachment 297012 [details]
Fix digest_null support

This patch should make enc only work again in RHEL5.
Comment 3 Don Zickus 2008-03-19 12:24:45 EDT
in kernel-2.6.18-86.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5
Comment 5 Joy Latten 2008-03-26 19:58:10 EDT
I am using kernel-2.6.18-87.el5 downloaded from dzickus but am still seeing the
problem of not being able to specify ESP by itself. Also, the TAHI testcases
appear to still fail for ESP only.

For example, 

The file setkey.test contains:
add <ip1> <ip2> esp 35590
-m transport
-E 3des-cbc "ipv6readylogo3descbcin01";

add <ip2> <ip1> esp 12360
-m transport
-E 3des-cbc "ipv6readylogo3descbcin01";

spdadd <ip1> <ip2> any
-P out ipsec

spdadd <ip2> <ip1> any
-P in ipsec

When I run "setkey -f setkey.test", I get:

[root@nachos ~]# setkey -f setkey.test
The result of line 3: (null).
The result of line 8: (null).
[root@nachos ~]#
[root@nachos ~]# setkey -D
No SAD entries.

None of my ESP SAs were set.

Will look at this some more... 
Comment 6 Joy Latten 2008-03-26 20:02:02 EDT
Herbert, Should "digest_null" be "hmac(digest_null)" in the snprintf in esp4.c?
Will try this and see what happens. Have not looked at esp6.c yet but appears to
be same problem.
Comment 7 Herbert Xu 2008-03-26 20:12:45 EDT
No, that's exactly what this patch is supposed to allow, i.e., calling setkey
directly on digest_null instead of going through hmac.  I'll download the kernel
and try to reproduce the problem.
Comment 8 Herbert Xu 2008-03-26 22:48:25 EDT
Created attachment 299254 [details]
[IPSEC]: Use hmac(digest_null) instead of digest_null

Argh I missed the fact that in the backport digest_null is still of type digest
instead of hash which is what we need for authenc.  In this case I completely
agree with you that using hmac(digest_null) is the best solution for RHEL5.

So here's the patch do just that.  Please let us know if it still breaks.
Comment 9 Joy Latten 2008-03-28 10:30:37 EDT
Yes!! This patch works great! Just ran TAHI and the tests passed!
Comment 12 Don Zickus 2008-04-02 12:09:31 EDT
in kernel-2.6.18-88.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5
Comment 15 errata-xmlrpc 2008-05-21 11:11:25 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.