I just revived my laptop (yey) after a few months of being down. I then ran a zypper update then did my usual security checks when rkhunter returned this result:
[10:56:09] Checking /dev for suspicious file types [ Warning ]
[10:56:09] Warning: Suspicious file types found in /dev:
[10:56:09] /dev/shm/sem.haveged_sem: data
Not much to see in the logs for that, but doing ls -al /dev/shm | grep -i sem returned this:
-rw-r--r-- 1 root root 32 May 24 10:40 sem.haveged_sem
I’m concerned because rkhunter flagged it as suspicious. What is that thing anyway?
This is named semaphore that haveged creates to synchronize activity between different components. The fact that it appears in /dev/shm is more or less implementation detail. /dev/shm is simply memory-based filesystem that has long history of being used to store various run-time data before /run took its place.