cat /dev/watchdog reboots the system!

· Read in about 1 min · (110 words) ·

I was surprized to find that following command reboots my Fedora 13 x86_64 system:

cat /dev/watchdog

Wait for around 30-50 seconds and Linux reboots! This happens even with a non-root user.

Then I googled it

I found this is a pretty interesting thread on the subject. Bottom line is

It’s a watchdog device, it’s meant to reboot the machine if whatever task is poking the watchdog dies.

So consider that in any installation if /dev/watchdog support is present in the default Linux kernel and the file has read permission to all users. Then anyone can reboot a system with such an innocent looking read command. Isn’t it a security risk?