﻿id	summary	reporter	owner	description	type	status	component	version	resolution	keywords	cc	guest	host
12760	VBoxSVC segfault with long paths in /dev -> fixed in series 4.3 and later as of 12 March 2014	srt		"VBoxSVC scans /dev and receives a SIGSEG if it encounters a long path in /dev.

Reproduce by executing the following commands:
{{{
mkdir -p /dev/0some/very/long/path/that/exceeds/128characters/in/total/and/starts/with/dev/triggers/this/error/as/you/will/see/when/you/try
/usr/lib/virtualbox/VBoxSVC
}}}
then start virtualbox in another terminal.

Result is that VBoxSVC crashes:
{{{
[1]    8728 segmentation fault (core dumped)  /usr/lib/virtualbox/VBoxSVC
}}}

You can run 
{{{
strace -ff -o vbox /usr/lib/virtualbox/VBoxSVC
}}}

to see the cause:

{{{
  % tail vbox.8826
lstat(""/dev/0some/very/long/path/that/exceeds/128characters/in/total/and/starts/with/dev/triggers/this/error/as/you/will/see/when"", {st_mode=S_IFDIR|0755, st_size=60, ...}) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x7f3e33716e38} ---
+++ killed by SIGSEGV (core dumped) +++
}}}


The core dump shows:
{{{
#0  0x00007f512c4a7936 in RTPathAbs () from /usr/lib/virtualbox/VBoxRT.so
}}}

Additional observations:
 - The error is not triggered if the current has no permission to access /dev/vboxusb
 - The error is not triggered if the long path is in /dev/shm and /dev/shm is a softlink to a different directory (as on Ubuntu)
 - The error is triggered if the long path is in /dev/shm and /dev/shm is a mount point for a tmpfs filesystem (as on Arch Linux)"	defect	closed	host support	VirtualBox 4.3.8	fixed	segfault dev		all	Linux
