Bug 695419 - audisp-remote calls bind() incorrectly
Summary: audisp-remote calls bind() incorrectly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: audit
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Steve Grubb
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 695605
TreeView+ depends on / blocked
 
Reported: 2011-04-11 17:10 UTC by Miloslav Trmač
Modified: 2011-04-25 13:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 695605 (view as bug list)
Environment:
Last Closed: 2011-04-25 13:12:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


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