# VirtualBox Segfaulting on Current Kernel

## Cygon

Hi!

I have been running a Windows VM on my server using VirtualBox for the past 3 years. Since updating my kernel to 3.2.12 (might have started earlier, I jumped one or two kernel updates), VBoxHeadless (from the PUEL-licensed virtualbox-bin package) crashes with a segfault:

```
 ~ $ /opt/VirtualBox/VBoxHeadless -startvm WinBuilder -vrdp on

Oracle VM VirtualBox Headless Interface 4.1.8

(C) 2008-2011 Oracle Corporation

All rights reserved.

Segmentation fault
```

I ran virtualbox with strace, here's the relevant part of the output:

```
readlink("/proc/self/exe", "/opt/VirtualBox/VBoxHeadless", 4099) = 28

getuid()                                = 999

getuid()                                = 999

getgid()                                = 195

geteuid()                               = 999

getegid()                               = 195

geteuid()                               = 999

write(2, "VBoxHeadless: Error -10 in SUPR3"..., 46VBoxHeadless: Error -10 in SUPR3HardenedMain!

) = 46

write(2, "VBoxHeadless: ", 14VBoxHeadless: )          = 14

write(2, "Effective UID is not root (euid="..., 61Effective UID is not root (euid=999 egid=195 uid=999 gid=195)) = 61

write(2, "\n", 1

)                       = 1

write(2, "\nVBoxHeadless: Tip! It may help "..., 57

VBoxHeadless: Tip! It may help to reinstall VirtualBox.

) = 57

setresgid(195, 195, 195)                = 0

setresuid(999, 999, 999)                = 0

getresuid([999], [999], [999])          = 0

getresgid([195], [195], [195])          = 0

capset(0x19980330, 0, {CAP_NET_RAW, CAP_NET_RAW, 0}) = -1 EPERM (Operation not permitted)

clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fcf2c0339f0) = 2678

exit_group(1)                           = ?
```

I'm not sure it the problem begins where it says "Effective UID is not root" (I'm running VirtualBox as a restricted user, until now this wasn't a problem), or if it begins when it seems to be unable to obtain permission for CAP_NET_RAW (VirtualBox uses some kernel modules to capture network packets).

The vboxdrv and vnetfilter modules are loaded and have been compiled against the sources of the kernel I'm running.

I haven't tried to run VBoxHeadless as root yet because then I would have to move my .VirtualBox directory to /root/ and hand-edit all the .xml files to point to the new path, but I'll try this when I've got some time again to see if it is indeed some kind of permission problem.

What can I do?

----------

## BillWho

Cygon

Is vboxnetadp loaded   :Question: 

 *Quote:*   

> VBoxHeadless: Tip! It may help to reinstall VirtualBox. 

 

Since the error message suggests reinstalling, did you try that   :Question: 

Good Luck   :Wink: 

----------

## Cygon

If a module is not loaded, VirtualBox actually prints a meaningful error message. In this case, vboxnetadp is not required, but I loaded it anyway - to no effect.

Yes, I did 'emerge --oneshot virtualbox-bin' and ran 'revdep-rebuild'. No joy.

I think this is most likely a problem due to new permissions being introduced that my virtualbox user is now missing. I just don't know where to look and how to set those permissions. If at all possible, I'd like to run VirtualBox as a restricted user, not root.

----------

## Trog Dog

There's a  bug to stabilise 4.1.12 as lesser versions don't play nice with 3.2.x kernels

----------

