Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): handle sctp protocol and all protocols with raw socket and add protocol:all network rule #1892

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rksharma95
Copy link
Collaborator

Purpose of PR?:
this PR adds changes to handle:

  • sctp protocol rule
  • all protocols with raw network socket/domain
    and adds support to handle protocol: all rule for network rules
action: Block
network:
  matchProtocols:
  -  protocol: all

Fixes #1838

Does this PR introduce a breaking change?
No
If the changes in this PR are manually verified, list down the scenarios covered::

Additional information for reviewer? :
Mention if this PR is part of any design or a continuation of previous PRs

Checklist:

  • Bug fix. Fixes audit alert with resource: unknown for network event #1838
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • PR Title follows the convention of <type>(<scope>): <subject>
  • Commit has unit tests
  • Commit has integration tests

@@ -425,6 +464,7 @@ static inline int match_net_rules(int type, int protocol, u32 eventID) {

SEC("lsm/socket_create")
int BPF_PROG(enforce_net_create, int family, int type, int protocol) {
bpf_printk("type: %d protocol: %d", type, protocol);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this

@Aryan-sharma11
Copy link
Member

Tested on EKS 2 node cluster, working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Merge Today
Development

Successfully merging this pull request may close these issues.

audit alert with resource: unknown for network event
3 participants