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

Incorrect Client Commandline Picked up for Packetbeat flows #9151

Closed
jamesspi opened this issue Nov 19, 2018 · 0 comments · Fixed by #9443
Closed

Incorrect Client Commandline Picked up for Packetbeat flows #9151

jamesspi opened this issue Nov 19, 2018 · 0 comments · Fixed by #9443
Assignees

Comments

@jamesspi
Copy link
Contributor

Packetbeat is occasionally picking up a random (incorrect) client_commandline process in flow data. The process has nothing to do with the related flow.

  • Version: 6.4.2, 6.4.3 and 6.5
  • Operating System: Centos 7

screenshot 2018-11-16 at 14 58 42

adriansr added a commit to adriansr/beats that referenced this issue Dec 7, 2018
The current implementation of Packetbeat's process monitor detects the
local process by looking at the local port number used. However,
differnet processes can be bound to the same port on different
interfaces.

This patch fixes the problem by looking up the process by using the
tuple (address, port).

Fixes elastic#9151
adriansr added a commit that referenced this issue Dec 11, 2018
The current implementation of Packetbeat's process monitor detects the
local process by looking at the local port number used. However,
different processes can be bound to the same port on different
interfaces.

This patch fixes the problem by looking up the process by using the
tuple (address, port).

There's still a case where Packetbeat can pick the wrong process:

When one process is bound to INADDR_ANY and another to a specific
local address. Testing suggests that the last socket to be bound takes
precedence over the other. However, I couldn't find this behavior
documented anywhere.

As Packetbeat can't tell which socket was bound first, there's no way
of telling which process is really receiving the traffic. This PR will give
precedence to a socket bound to a local IP-address over a socket
bound to INADDR_ANY.



Fixes #9151
adriansr added a commit to adriansr/beats that referenced this issue Dec 11, 2018
The current implementation of Packetbeat's process monitor detects the
local process by looking at the local port number used. However,
different processes can be bound to the same port on different
interfaces.

This patch fixes the problem by looking up the process by using the
tuple (address, port).

There's still a case where Packetbeat can pick the wrong process:

When one process is bound to INADDR_ANY and another to a specific
local address. Testing suggests that the last socket to be bound takes
precedence over the other. However, I couldn't find this behavior
documented anywhere.

As Packetbeat can't tell which socket was bound first, there's no way
of telling which process is really receiving the traffic. This PR will give
precedence to a socket bound to a local IP-address over a socket
bound to INADDR_ANY.



Fixes elastic#9151

(cherry picked from commit 824d443)
adriansr added a commit that referenced this issue Dec 12, 2018
The current implementation of Packetbeat's process monitor detects the
local process by looking at the local port number used. However,
different processes can be bound to the same port on different
interfaces.

This patch fixes the problem by looking up the process by using the
tuple (address, port).

There's still a case where Packetbeat can pick the wrong process:

When one process is bound to INADDR_ANY and another to a specific
local address. Testing suggests that the last socket to be bound takes
precedence over the other. However, I couldn't find this behavior
documented anywhere.

As Packetbeat can't tell which socket was bound first, there's no way
of telling which process is really receiving the traffic. This PR will give
precedence to a socket bound to a local IP-address over a socket
bound to INADDR_ANY.



Fixes #9151

(cherry picked from commit 824d443)
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

Successfully merging a pull request may close this issue.

2 participants