Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
chkproc/chkrootkit while doing emerge
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
PennyroyalFrog
Apprentice
Apprentice


Joined: 07 Oct 2004
Posts: 194

PostPosted: Sat Jan 08, 2005 6:18 am    Post subject: chkproc/chkrootkit while doing emerge Reply with quote

This post is more of a follow up on a previous post i did about a possible LKM trojan installed. However, the consensus with everybody seems that it was a false positve.

Anyway, to get more towards the point to my question, which is a question out of curiosity, when i run a chkproc -v while doing an emerge while in X (i use KDE as my desktop) i get a bunch of false positives for hidden processes, because of all the quickly terminating processes during the compile i learned.
However, if i'm not in X, and run emerge in one console and change to a second console via alt-F2, i don't get any 'hidden' processes no matter how many times i run chkproc -v to check for hidden processes. Like i said this is more a question out of curiosity why this is, sorry if it's a pointless question. I do have obsessive compulsive disorder so that's why i'm kinda obsessing over it.

Thanks.
Back to top
View user's profile Send private message
PennyroyalFrog
Apprentice
Apprentice


Joined: 07 Oct 2004
Posts: 194

PostPosted: Sat Jan 08, 2005 8:14 pm    Post subject: Reply with quote

nobody has any ideas? i would really like to know... thanks in advance
Back to top
View user's profile Send private message
speed_bump
Tux's lil' helper
Tux's lil' helper


Joined: 10 Jan 2004
Posts: 92
Location: Wisconsin, USA

PostPosted: Sat Jan 08, 2005 9:38 pm    Post subject: Reply with quote

Alrighty, this is largely conjecture at this point, but here it goes. The problem you're describing is in the general class of problems known as race conditions. This basically refers to two or more different processes accessing the same data set(s) in such a way that the ordering of events can affect the results. In the case of chkproc, it effectively executes a ps and then directly traverses the /proc directory comparing the results. So at the time of the comparison, you have the ps output and then the information from /proc collected at different points in time (most likely many milliseconds apart).

I have not done any timings to find out exaclty how the time it takes to traverse the /proc directory varies with respect to the number of entries in the directory, but I suspect that the more processes you have, the longer it takes (probably substantially longer). So when you have X11 running and something like KDE or Gnome fired up, you'll have on the order of 70-80 processes at a minimum. When you're just at a plain console, it's more like 20-30. So effectively, the time window during which the results of one action (ps) can diverge from the results of another (/proc directory traversal) has changed significantly. If that time window is small enough, everything works as you would expect. Lengthen the time window beyond a certain point (add more processes), and you have problems.

Classic race condition. In this case, not correctable.
Back to top
View user's profile Send private message
PennyroyalFrog
Apprentice
Apprentice


Joined: 07 Oct 2004
Posts: 194

PostPosted: Sun Jan 09, 2005 12:39 am    Post subject: Reply with quote

thanks for the reply, you rock!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum