Skip to content

Commit

Permalink
fix(modern_bpf): null destination address in sendmsg syscall
Browse files Browse the repository at this point in the history
Signed-off-by: Gianmatteo Palmieri <[email protected]>
  • Loading branch information
mrgian authored and poiana committed Feb 14, 2024
1 parent 4a07742 commit fee3c50
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ int BPF_PROG(sendmsg_e,
*/
if(socket_fd >= 0)
{
auxmap__store_socktuple_param(auxmap, socket_fd, OUTBOUND, NULL);
struct sockaddr *usrsockaddr;
struct msghdr *msg = (struct msghdr*)msghdr_pointer;
BPF_CORE_READ_USER_INTO(&usrsockaddr, msg, msg_name);
auxmap__store_socktuple_param(auxmap, socket_fd, OUTBOUND, usrsockaddr);
}
else
{
Expand Down

0 comments on commit fee3c50

Please sign in to comment.