Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-49763

SELinux denials appear during libguestfs-test-tool run

    • selinux-policy-40.13.9-1.el10
    • None
    • Important
    • rhel-sst-security-selinux
    • ssg_security
    • 27
    • None
    • QE ack
    • False
    • Hide

      None

      Show
      None
    • No
    • None
    • Unspecified Release Note Type - Unknown
    • All
    • None

      What were you trying to do that didn't work?

      [root@localhost home]# libguestfs-test-tool 
           ************************************************************
           *                    IMPORTANT NOTICE
           *
           * When reporting bugs, include the COMPLETE, UNEDITED
           * output below in your bug report.
           *
           ************************************************************
      PATH=/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
      XDG_RUNTIME_DIR=/run/user/0
      SELinux: Enforcing
      guestfs_get_append: (null)
      guestfs_get_autosync: 1
      guestfs_get_backend: libvirt
      guestfs_get_backend_settings: []
      guestfs_get_cachedir: /var/tmp
      guestfs_get_hv: /usr/libexec/qemu-kvm
      guestfs_get_memsize: 1280
      guestfs_get_network: 0
      guestfs_get_path: /usr/lib64/guestfs
      guestfs_get_pgroup: 0
      guestfs_get_program: libguestfs-test-tool
      guestfs_get_recovery_proc: 1
      guestfs_get_smp: 1
      guestfs_get_sockdir: /tmp
      guestfs_get_tmpdir: /tmp
      guestfs_get_trace: 0
      guestfs_get_verbose: 1
      host_cpu: x86_64
      Launching appliance, timeout set to 600 seconds.
      libguestfs: launch: program=libguestfs-test-tool
      libguestfs: launch: version=1.52.1rhel=10,release=6.el10,libvirt
      libguestfs: launch: backend registered: direct
      libguestfs: launch: backend registered: libvirt
      libguestfs: launch: backend=libvirt
      libguestfs: launch: tmpdir=/tmp/libguestfsGmHkyJ
      libguestfs: launch: umask=0022
      libguestfs: launch: euid=0
      libguestfs: libvirt version = 10005000 (10.5.0)
      libguestfs: guest random name = guestfs-3bte6dftpgnb3lap
      libguestfs: connect to libvirt
      libguestfs: opening libvirt handle: URI = qemu:///system, auth = default+wrapper, flags = 0
      libguestfs: successfully opened libvirt handle: conn = 0x55782ce81350
      libguestfs: qemu version (reported by libvirt) = 9000000 (9.0.0)
      libguestfs: get libvirt capabilities
      libguestfs: parsing capabilities XML
      libguestfs: parsing domcapabilities XML
      libguestfs: build appliance
      libguestfs: begin building supermin appliance
      libguestfs: run supermin
      libguestfs: command: run: /usr/bin/supermin
      libguestfs: command: run: \ --build
      libguestfs: command: run: \ --verbose
      libguestfs: command: run: \ --if-newer
      libguestfs: command: run: \ --lock /var/tmp/.guestfs-0/lock
      libguestfs: command: run: \ --copy-kernel
      libguestfs: command: run: \ -f ext2
      libguestfs: command: run: \ --host-cpu x86_64
      libguestfs: command: run: \ /usr/lib64/guestfs/supermin.d
      libguestfs: command: run: \ -o /var/tmp/.guestfs-0/appliance.d
      supermin: version: 5.3.4
      supermin: rpm: detected RPM version 4.19
      supermin: rpm: detected RPM architecture x86_64
      supermin: package handler: fedora/rpm
      supermin: acquiring lock on /var/tmp/.guestfs-0/lock
      supermin: build: /usr/lib64/guestfs/supermin.d
      supermin: reading the supermin appliance
      supermin: build: visiting /usr/lib64/guestfs/supermin.d/base.tar.gz type gzip base image (tar)
      supermin: build: visiting /usr/lib64/guestfs/supermin.d/daemon.tar.gz type gzip base image (tar)
      supermin: build: visiting /usr/lib64/guestfs/supermin.d/excludefiles type uncompressed excludefiles
      supermin: build: visiting /usr/lib64/guestfs/supermin.d/hostfiles type uncompressed hostfiles
      supermin: build: visiting /usr/lib64/guestfs/supermin.d/init.tar.gz type gzip base image (tar)
      supermin: build: visiting /usr/lib64/guestfs/supermin.d/packages type uncompressed packages
      supermin: build: visiting /usr/lib64/guestfs/supermin.d/udev-rules.tar.gz type gzip base image (tar)
      supermin: build: visiting /usr/lib64/guestfs/supermin.d/zz-packages-xfs type uncompressed packages
      supermin: mapping package names to installed packages
      supermin: resolving full list of package dependencies
      supermin: build: 188 packages, including dependencies
      supermin: build: 31112 files
      supermin: build: 7331 files, after matching excludefiles
      supermin: build: 7339 files, after adding hostfiles
      supermin: build: 7326 files, after removing unreadable files
      supermin: build: 7355 files, after munging
      supermin: kernel: looking for kernel using environment variables ...
      supermin: kernel: looking for kernels in /lib/modules/*/vmlinuz ...
      supermin: kernel: picked vmlinuz /lib/modules/6.10.0-15.el10.x86_64/vmlinuz
      supermin: kernel: kernel_version 6.10.0-15.el10.x86_64
      supermin: kernel: modpath /lib/modules/6.10.0-15.el10.x86_64
      supermin: ext2: creating empty ext2 filesystem '/var/tmp/.guestfs-0/appliance.d.mduns96z/root'
      supermin: ext2: populating from base image
      supermin: ext2: copying files from host filesystem
      supermin: ext2: copying kernel modules
      supermin: ext2: creating minimal initrd '/var/tmp/.guestfs-0/appliance.d.mduns96z/initrd'
      supermin: ext2: wrote 38 modules to minimal initrd
      supermin: renaming /var/tmp/.guestfs-0/appliance.d.mduns96z to /var/tmp/.guestfs-0/appliance.d
      libguestfs: finished building supermin appliance
      libguestfs: command: run: qemu-img --help | grep -sqE -- '\binfo\b.*-U\b'
      libguestfs: command: run: qemu-img
      libguestfs: command: run: \ info
      libguestfs: command: run: \ -U
      libguestfs: command: run: \ --output json
      libguestfs: command: run: \ /var/tmp/.guestfs-0/appliance.d/root
      libguestfs: parse_json: qemu-img info JSON output:\n{\n    "children": [\n        {\n            "name": "file",\n            "info": {\n                "children": [\n                ],\n                "virtual-size": 4294967296,\n                "filename": "/var/tmp/.guestfs-0/appliance.d/root",\n                "format": "file",\n                "actual-size": 315101184,\n                "format-specific": {\n                    "type": "file",\n                    "data": {\n                    }\n                },\n                "dirty-flag": false\n            }\n        }\n    ],\n    "virtual-size": 4294967296,\n    "filename": "/var/tmp/.guestfs-0/appliance.d/root",\n    "format": "raw",\n    "actual-size": 315101184,\n    "dirty-flag": false\n}\n\n
      libguestfs: command: run: qemu-img
      libguestfs: command: run: \ create
      libguestfs: command: run: \ -f qcow2
      libguestfs: command: run: \ -o backing_file=/var/tmp/.guestfs-0/appliance.d/root,backing_fmt=raw
      libguestfs: command: run: \ /tmp/libguestfsGmHkyJ/overlay2.qcow2
      Formatting '/tmp/libguestfsGmHkyJ/overlay2.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=4294967296 backing_file=/var/tmp/.guestfs-0/appliance.d/root backing_fmt=raw lazy_refcounts=off refcount_bits=16
      libguestfs: create libvirt XML
      libguestfs: libvirt XML:\n<?xml version="1.0"?>\n<domain type="kvm" xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0">\n  <name>guestfs-3bte6dftpgnb3lap</name>\n  <memory unit="MiB">1280</memory>\n  <currentMemory unit="MiB">1280</currentMemory>\n  <cpu mode="maximum">\n    <feature policy="disable" name="la57"/>\n  </cpu>\n  <vcpu>1</vcpu>\n  <clock offset="utc">\n    <timer name="rtc" tickpolicy="catchup"/>\n    <timer name="pit" tickpolicy="delay"/>\n    <timer name="hpet" present="no"/>\n  </clock>\n  <os>\n    <type machine="q35">hvm</type>\n    <kernel>/var/tmp/.guestfs-0/appliance.d/kernel</kernel>\n    <initrd>/var/tmp/.guestfs-0/appliance.d/initrd</initrd>\n    <cmdline>panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=UUID=bf16b05f-30f4-4e60-ba92-2fab62ad06ec selinux=0 guestfs_verbose=1 TERM=vt220</cmdline>\n    <bios useserial="yes"/>\n  </os>\n  <on_reboot>destroy</on_reboot>\n  <devices>\n    <rng model="virtio">\n      <backend model="random">/dev/urandom</backend>\n    </rng>\n    <controller type="scsi" index="0" model="virtio-scsi"/>\n    <disk device="disk" type="file">\n      <source file="/tmp/libguestfsGmHkyJ/scratch1.img"/>\n      <target dev="sda" bus="scsi"/>\n      <driver name="qemu" type="raw" cache="unsafe"/>\n      <address type="drive" controller="0" bus="0" target="0" unit="0"/>\n    </disk>\n    <disk type="file" device="disk">\n      <source file="/tmp/libguestfsGmHkyJ/overlay2.qcow2"/>\n      <target dev="sdb" bus="scsi"/>\n      <driver name="qemu" type="qcow2" cache="unsafe"/>\n      <address type="drive" controller="0" bus="0" target="1" unit="0"/>\n    </disk>\n    <serial type="unix">\n      <source mode="connect" path="/tmp/libguestfssRMjZE/console.sock"/>\n      <target port="0"/>\n    </serial>\n    <channel type="unix">\n      <source mode="connect" path="/tmp/libguestfssRMjZE/guestfsd.sock"/>\n      <target type="virtio" name="org.libguestfs.channel.0"/>\n    </channel>\n    <controller type="usb" model="none"/>\n    <memballoon model="none"/>\n  </devices>\n  <qemu:commandline>\n    <qemu:env name="TMPDIR" value="/var/tmp"/>\n  </qemu:commandline>\n</domain>\n
      libguestfs: command: run: ls
      libguestfs: command: run: \ -a
      libguestfs: command: run: \ -l
      libguestfs: command: run: \ -R
      libguestfs: command: run: \ -Z /var/tmp/.guestfs-0
      libguestfs: /var/tmp/.guestfs-0:
      libguestfs: total 4
      libguestfs: drwxr-xr-x. 3 root root unconfined_u:object_r:user_tmp_t:s0   37 Jul 19 04:06 .
      libguestfs: drwxrwxrwt. 7 root root system_u:object_r:tmp_t:s0          4096 Jul 19 04:06 ..
      libguestfs: drwxr-xr-x. 2 root root unconfined_u:object_r:user_tmp_t:s0   46 Jul 19 04:06 appliance.d
      libguestfs: -rw-r--r--. 1 root root unconfined_u:object_r:user_tmp_t:s0    0 Jul 19 04:06 lock
      libguestfs: 
      libguestfs: /var/tmp/.guestfs-0/appliance.d:
      libguestfs: total 331260
      libguestfs: drwxr-xr-x. 2 root root unconfined_u:object_r:user_tmp_t:s0         46 Jul 19 04:06 .
      libguestfs: drwxr-xr-x. 3 root root unconfined_u:object_r:user_tmp_t:s0         37 Jul 19 04:06 ..
      libguestfs: -rw-r--r--. 1 root root unconfined_u:object_r:user_tmp_t:s0    8739328 Jul 19 04:06 initrd
      libguestfs: -rwxr-xr-x. 1 root root unconfined_u:object_r:user_tmp_t:s0   15366264 Jul 19 04:06 kernel
      libguestfs: -rw-r--r--. 1 root root unconfined_u:object_r:user_tmp_t:s0 4294967296 Jul 19 04:06 root
      libguestfs: command: run: ls
      libguestfs: command: run: \ -a
      libguestfs: command: run: \ -l
      libguestfs: command: run: \ -Z /tmp/libguestfssRMjZE
      libguestfs: total 0
      libguestfs: drwxr-xr-x.  2 root root unconfined_u:object_r:user_tmp_t:s0  80 Jul 19 04:06 .
      libguestfs: drwxrwxrwt. 12 root root system_u:object_r:tmp_t:s0          240 Jul 19 04:06 ..
      libguestfs: srw-rw----.  1 root qemu unconfined_u:object_r:user_tmp_t:s0   0 Jul 19 04:06 console.sock
      libguestfs: srw-rw----.  1 root qemu unconfined_u:object_r:user_tmp_t:s0   0 Jul 19 04:06 guestfsd.sock
      libguestfs: launch libvirt guest
      libguestfs: error: could not create appliance through libvirt.
      Try running qemu directly without libvirt using this environment variable:
      export LIBGUESTFS_BACKEND=direct
      Original error from libvirt: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Remote peer disconnected [code=89 int1=0]
      libguestfs: closing guestfs handle 0x55782ce7d7d0 (state 0)
      libguestfs: command: run: rm
      libguestfs: command: run: \ -rf /tmp/libguestfsGmHkyJ
      libguestfs: command: run: rm
      libguestfs: command: run: \ -rf /tmp/libguestfssRMjZE
      
      

      Please provide the package NVR for which bug is seen:

      libguestfs-1.52.1-6.el10.x86_64
      libvirt-libs-10.5.0-1.el10.x86_64
      qemu-kvm-core-9.0.0-4.el10.x86_64
      kernel-6.10.0-15.el10.x86_64
      selinux-policy-40.13.5-1.el10.noarch 

      How reproducible:

      100%

      Steps to reproduce

      1. Run libguestfs-test-tool on RHEL10.0 Beta host

      Expected results

      libguestfs-test-tool works fine.

       

      Notes:

      1. This issue happened in the latest RHEL-10.0-20240717.79 compose.

      2. There is no problem with direct mode.

              rhn-support-zpytela Zdenek Pytela
              yoguo@redhat.com Yongkui Guo
              Zdenek Pytela Zdenek Pytela
              Milos Malik Milos Malik
              Votes:
              0 Vote for this issue
              Watchers:
              24 Start watching this issue

                Created:
                Updated: