New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 697499 link

Starred by 0 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

jabra-vold should sanity check the target process before killing it

Project Member Reported by vapier@chromium.org, Mar 1 2017

Issue description

in the "stop" logic for jabra-vold, it opens & blindly kills whatever pid is listed in there.  if the daemon crashed or otherwise exited, there's no guarantee that the pid in there is still valid.  another process might have started up and the kill would take it out.

granted, this is unlikely due to the uid/gid usage, but it's still possible.

the way to fix this would be to have the stop logic:
- chdir(/proc/$PID) to avoid race conditions
- read the exe symlink
- if the symlink points to jabra_vold, then the process is OK to kill
- for super sanity, also check the cmdline file and see if the usb bus/dev match
 

Comment 1 by h...@chromium.org, Mar 7 2017

Cc: vpalatin@chromium.org
Owner: ----
sorry I'm not with Chrome OS team any more.

CC +vpalatin@
Owner: hychao@chromium.org

Comment 3 Deleted

Comment 4 Deleted

Status: Assigned (was: Available)

Sign in to add a comment