Menu

#76 Always bind to all IP addresses

open
Jin
5
2010-08-04
2010-08-04
Anonymous
No

No matter what command line or config file configuration is, MediaTomb always bind to all interfaces (which I think is serious security issue).

See this strace:

# strace -f /usr/bin/mediatomb -c /etc/mediatomb/config.xml -d -u mediatomb -g mediatomb -P /var/run/mediatomb.pid -l /var/log/mediatomb.log -i 192.168.33.5 -a /home/share/video/ 2>&1 | grep -i bind
[pid 23681] bind(5, {sa_family=AF_INET, sin_port=htons(49152), sin_addr=inet_addr("0.0.0.0")}, 16) = -1 EADDRINUSE (Address already in use)
[pid 23681] bind(5, {sa_family=AF_INET, sin_port=htons(49153), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
[pid 23681] bind(6, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("127.0.0.1")}, 16) = 0
[pid 23681] bind(7, {sa_family=AF_INET, sin_port=htons(1900), sin_addr=inet_addr("0.0.0.0")}, 16) = 0

I would expect to bind to defined 192.168.33.5 on command line, however it binds to 0.0.0.0 (all interfaces).

Discussion


Log in to post a comment.