Bug 436267

Summary: Cannot create an SA with ESP enc only or AH only
Product: Red Hat Enterprise Linux 5 Reporter: Herbert Xu <herbert.xu>
Component: kernelAssignee: Thomas Graf <tgraf>
Status: CLOSED ERRATA QA Contact: Martin Jenner <mjenner>
Severity: medium Docs Contact:
Priority: high    
Version: 5.2CC: dzickus, herbert.xu, lwang, rkhan
Target Milestone: rc   
Target Release: ---   
Hardware: ia32e   
OS: All   
Whiteboard:
Fixed In Version: RHBA-2008-0314 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-21 15:11:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 253764    
Attachments:
Description Flags
Fix digest_null support
none
[IPSEC]: Use hmac(digest_null) instead of digest_null none

Comment 1 Herbert Xu 2008-03-06 09:08:37 UTC
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 16:24:45 UTC
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 23:58:10 UTC
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
esp/transport//require;

spdadd <ip2> <ip1> any
-P in ipsec
esp/transport//require;


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-27 00:02:02 UTC
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-27 00:12:45 UTC
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-27 02:48:25 UTC
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 14:30:37 UTC
Yes!! This patch works great! Just ran TAHI and the tests passed!

Comment 12 Don Zickus 2008-04-02 16:09:31 UTC
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 15:11:25 UTC
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.

http://rhn.redhat.com/errata/RHBA-2008-0314.html