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

extractor: use bpf_probe_read_user_str() instead of bpf_probe_read_str() #82

Open
0xB10C opened this issue Nov 13, 2024 · 0 comments
Open

Comments

@0xB10C
Copy link
Owner

0xB10C commented Nov 13, 2024

bpf_probe_read_str(&meta->addr, sizeof(meta->addr), addr);
bpf_probe_read_str(&meta->conn_type, sizeof(meta->conn_type), conn_type);
bpf_probe_read_str(&meta->msg_type, sizeof(meta->msg_type), msg_type);

In multiple places, we use bpf_probe_read_str. https://man7.org/linux/man-pages/man7/bpf-helpers.7.html recommends to use bpf_probe_read_user_str instead.

Generally, use bpf_probe_read_user_str() or bpf_probe_read_kernel_str() instead.

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

No branches or pull requests

1 participant