Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 666613 - app-emulation/virtualbox-bin fail to change VM settings unless running as root
Summary: app-emulation/virtualbox-bin fail to change VM settings unless running as root
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Deadline: 2020-09-21
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PMASKED
Depends on:
Blocks:
 
Reported: 2018-09-20 09:42 UTC by Alex Efros
Modified: 2020-09-21 07:31 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Efros 2018-09-20 09:42:06 UTC
It is impossible to change settings of existing VM when VirtualBox is started by non-root user. It is possible to create new VM, but it settings also can't be changed after that.

It looks like VirtualBox unable to detect amount of available CPU, so it show 0 CPU in VM settings and fail saving settings with related error message:

  Failed to save the settings.
  Invalid virtual CPU count: 0 (must be in range [1, 32]).
  Result Code: NS_ERROR_INVALID_ARG (0x80070057)
  Component: SessionMachine
  Interface: IMachine {85cd948e-a71f-4289-281e-0ca7ad48cd89}

This happens in both current stable 5.2.14.123301 and latest 5.2.18.124319.

I didn't used VirtualBox for a while (a year or so), so I'm unsure when this issue happens (it worked before).

In theory VirtualBox is SUID and should run just fine:

  $ ls -l /opt/VirtualBox/VirtualBox                                                             
  -r-s--x--- 1 root vboxusers 154200 сен 20 11:40 /opt/VirtualBox/VirtualBox
  $ groups                                                                                       
  sys lp wheel uucp cron audio cdrom video games kvm cdrw usb users lpadmin davfs2 vboxusers wireshark portage docker powerman

but in practice this works only when started using sudo (everything else - creating new VM and running VM works just fine without sudo).


Portage 2.3.40 (python 3.6.5-final-0, default/linux/amd64/17.0/hardened, gcc-7.3.0, glibc-2.26-r7, 4.9.74-unofficial+grsec x86_64)
=================================================================
System uname: Linux-4.9.74-unofficial+grsec-x86_64-Intel-R-_Core-TM-_i7-2600K_CPU_@_3.40GHz-with-gentoo-2.4.1
KiB Mem:    24644780 total,  18440032 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Thu, 20 Sep 2018 08:15:02 +0000
Head commit of repository gentoo: ca4230a81e98dc69e9c6e64cf3ba3cde054e9a8f
sh bash 4.4_p12
ld GNU ld (Gentoo 2.30 p2) 2.30.0
ccache version 3.3.4 [enabled]
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/ccache:          3.3.4-r1::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.15.1-r2::gentoo
sys-devel/binutils:       2.30-r2::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r7::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.nl.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: --exclude ChangeLog --delete-excluded
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1

local
    location: /usr/local/portage
    masters: gentoo
    priority: 0

gamerlay
    location: /var/lib/layman/gamerlay
    masters: gentoo
    priority: 50

powerman
    location: /home/powerman/proj/gentoo/powerman-overlay
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /service /usr/inferno/keydb /usr/inferno/lib /usr/inferno/services /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/i2p/scripts /var/log /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage-distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --autounmask-write --alert=y"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://mirrors.soeasyto.com/distfiles.gentoo.org/ http://gentoo.supp.name/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://mirror.netcologne.de/gentoo/"
LANG="ru_RU.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en ru ru_RU"
MAKEOPTS="-j8"
PKGDIR="/usr/portage-packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude ChangeLog --delete-excluded"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi adns aes alac alsa amd64 avx bash-completion berkdb bluetooth branding bzip2 cairo caps cdda cddb cdr chm cli consolekit crypt cups cxx dbus dga djvu dri dts dvb dvd dvdr egl eglfs emboss encode exif fam ffmpeg firefox flac fontconfig gallium gdbm gif glamor gpg gtk gtkstyle hardened iconv icu id3tag idn ipv6 jpeg jpeg2k lcms libnotify libtirpc mac mad matroska mmx mmxext mng mp3 mp4 mpeg multilib musepack ncurses network-cron nls nptl nsplugin ogg opengl openmp pam pango pax_kernel pclmul pcre pdf perl pie png policykit popcnt ppds projectm qt5 readline rtc sdl seccomp spell sse sse2 sse3 sse4_1 sse4_2 ssl ssp ssse3 startup-notification svg tcpd theora tiff truetype udev udisks unicode upower usb vaapi vdpau vim-syntax vorbis wavpack wxwidgets x264 x265 xattr xcb xml xscreensaver xtpax xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="log_config vhost_alias autoindex alias rewrite dir deflate filter mime negotiation auth_basic authn_file authz_host authz_user authz_groupfile cgi actions headers env setenvif authn_core authz_core unixd socache_shmcb access_compat" CALLIGRA_FEATURES="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="evdev" KERNEL="linux" L10N="en ru" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NGINX_MODULES_HTTP="access auth_basic autoindex browser charset empty_gif fastcgi geo gzip limit_conn limit_req map memcached proxy referer rewrite scgi split_clients ssi upstream_ip_hash userid uwsgi fancyindex" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" QEMU_SOFTMMU_TARGETS="x86_64 i386" QEMU_USER_TARGETS="x86_64 i386" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="nvidia nouveau" XFCE_PLUGINS="clock trash" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 1 Jonas Stein gentoo-dev 2018-09-20 17:54:47 UTC
Which versions of app-emulation/virtualbox-bin are affected?
Does it work for you with the source based package?
Comment 2 Alex Efros 2018-09-20 19:09:42 UTC
(In reply to Jonas Stein from comment #1)
> Which versions of app-emulation/virtualbox-bin are affected?
> Does it work for you with the source based package?

I've already mentioned two affected versions above:

> This happens in both current stable 5.2.14.123301 and latest 5.2.18.124319.

I didn't tried app-emulation/virtualbox yet, will try it later.
Comment 3 Alex Efros 2018-09-20 19:21:59 UTC
Sorry, can't emerge source package because of https://bugs.gentoo.org/653504#c4
Comment 4 Pacho Ramos gentoo-dev 2018-10-08 10:35:51 UTC
it seems polynomial-C is still taking care of this package even if metadata.xml states it is orphan :/
Comment 5 Pacho Ramos gentoo-dev 2018-10-20 18:25:53 UTC
(In reply to Pacho Ramos from comment #4)
> it seems polynomial-C is still taking care of this package even if
> metadata.xml states it is orphan :/

any problem with reassigning it to you? Thanks
Comment 6 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-10-21 12:50:31 UTC
(In reply to Pacho Ramos from comment #5)
> (In reply to Pacho Ramos from comment #4)
> > it seems polynomial-C is still taking care of this package even if
> > metadata.xml states it is orphan :/
> 
> any problem with reassigning it to you? Thanks

Well, I don't use the package and merely do the package bumps because nobody else does.
Comment 7 Pacho Ramos gentoo-dev 2018-10-21 14:14:21 UTC
OK, then, better keep it in maintainer-needed :)
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-09-21 07:31:22 UTC
removed.