Bug 2054746

Summary: Wrong IP address/port info appearing sometimes in AVCs for SCTP sockets
Product: Red Hat Enterprise Linux 8 Reporter: Ondrej Mosnacek <omosnace>
Component: kernelAssignee: Ondrej Mosnacek <omosnace>
kernel sub component: SELinux QA Contact: Milos Malik <mmalik>
Status: ASSIGNED --- Docs Contact:
Severity: low    
Priority: low Keywords: Triaged
Version: 8.4   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ondrej Mosnacek 2022-02-15 15:55:39 UTC
Originally spotted in BZ 2054116. It seems when we get to dump_common_audit_data() via selinux_sctp_assoc_request(), we may get wrong srd/dst IP address/port info from the socket. Presumably these come from another previously set up association. SCTP peeloff might be also involved somehow.

Note to self: Perhaps trying to extract the info from sctp_assoc instead of sock might fix this. But it still isn't clear why the socket doesn't have info from the last packet. Possibly a race condition? Could this happen with other protocols?