Bug 695419

Summary: audisp-remote calls bind() incorrectly
Product: [Fedora] Fedora Reporter: Miloslav Trmač <mitr>
Component: auditAssignee: Steve Grubb <sgrubb>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: sgrubb, tmraz
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 695605 (view as bug list) Environment:
Last Closed: 2011-04-25 13:12:45 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: 695605    

Description Miloslav Trmač 2011-04-11 17:10:45 UTC
Description of problem:

audisp-remote does
>		memset (&address, 0, sizeof(address));
>		address.sin_family = htons(AF_INET);
>		address.sin_port = htons(config.local_port);
>		address.sin_addr.s_addr = htonl(INADDR_ANY);
which shows in strace as

> bind(3, {sa_family=0x200 /* AF_??? */, sa_data="\0<\0\0\0\0\0\0\0\0\0\0\0\0"}, 16) = 0

For some reason the call still succeeds, but a correct invocation would not call htons on AF_INET.

Comment 1 Steve Grubb 2011-04-11 17:26:40 UTC
It works because the audit daemon also has a matching mistake. Fixed in revision 505.

Comment 2 Tomas Mraz 2011-04-12 06:33:47 UTC
And is the daemon really listening on IPv4 port in this case or not?

Comment 3 Steve Grubb 2011-04-25 13:12:45 UTC
2.1.1 is in rawhide and the testing repo which fixes this issue. Thanks for reporting it.