RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2000000 - too many usbguard messages in the journal
Summary: too many usbguard messages in the journal
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: usbguard
Version: 8.5
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Zoltan Fridrich
QA Contact: Dalibor Pospíšil
Mirek Jahoda
URL:
Whiteboard:
Depends On:
Blocks: 1969483 2009226
TreeView+ depends on / blocked
 
Reported: 2021-09-01 07:30 UTC by Milos Malik
Modified: 2022-09-27 09:04 UTC (History)
7 users (show)

Fixed In Version: usbguard-1.0.0-3.el8
Doc Type: Bug Fix
Doc Text:
.`usbguard-notifier` no longer logs too many error messages to the Journal Previously, the `usbguard-notifier` service did not have inter-process communication (IPC) permissions for connecting to the `usbguard-daemon` IPC interface. Consequently, `usbguard-notifier` failed to connect to the interface, and it wrote a corresponding error message to the Journal. Because `usbguard-notifier` started with the `--wait` option, which ensured that `usbguard-notifier` attempted to connect to the IPC interface each second after a connection failure, by default, the log contained an excessive amount of these messages. With this update, `usbguard-notifier` does not start with `--wait` by default. The service attempts to connect to the daemon only three times in the 1-second intervals. As a result, the log contains three such error messages at maximum.
Clone Of:
: 2009226 (view as bug list)
Environment:
Last Closed: 2022-05-10 13:36:46 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-95835 0 None None None 2021-09-01 07:34:49 UTC
Red Hat Issue Tracker SECENGSP-4065 0 None None None 2021-09-01 07:34:53 UTC
Red Hat Product Errata RHBA-2022:1779 0 None None None 2022-05-10 13:36:57 UTC

Description Milos Malik 2021-09-01 07:30:13 UTC
Description of problem:
Sep 01 09:23:28 localhost.localdomain usbguard-notifier[2310]: Check if usbguard-daemon is running in the background
Sep 01 09:23:28 localhost.localdomain usbguard-notifier[2310]: IPC connection failure!IPC connect: service=usbguard: Operation not permitted
Sep 01 09:23:28 localhost.localdomain usbguard-daemon[7238]: IPC connection denied: uid=42 gid=42 pid=2310
Sep 01 09:23:27 localhost.localdomain usbguard-notifier[2310]: Check if usbguard-daemon is running in the background
Sep 01 09:23:27 localhost.localdomain usbguard-notifier[2310]: IPC connection failure!IPC connect: service=usbguard: Operation not permitted
Sep 01 09:23:27 localhost.localdomain usbguard-daemon[7238]: IPC connection denied: uid=42 gid=42 pid=2310

Version-Release number of selected component (if applicable):
usbguard-dbus-1.0.0-2.el8.x86_64
usbguard-selinux-1.0.0-2.el8.noarch
usbguard-1.0.0-2.el8.x86_64
usbguard-notifier-1.0.0-2.el8.x86_64

How reproducible:
* always

Steps to Reproduce:
1. get a RHEL-8.5 machine
2. install usbguard* packages
3. start both usbguard and usbguard-dbus services
4. look into the journal

# ps -efZ | grep usbguard
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 gdm 2310 2241  0 09:10 ? 00:00:00 /usr/bin/usbguard-notifier -w
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 root 5322 5302  0 09:17 ? 00:00:00 /usr/bin/usbguard-notifier -w
system_u:system_r:usbguard_t:s0 root        7228       1  0 09:22 ?        00:00:00 /usr/sbin/usbguard-dbus --system
system_u:system_r:usbguard_t:s0 root        7238       1  0 09:22 ?        00:00:00 /usr/sbin/usbguard-daemon -f -s -c /etc/usbguard/usbguard-daemon.conf
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 root 8973 5804  0 09:27 pts/0 00:00:00 grep --color=auto usbguard
#

Additional info:
SELinux state does not have any effect.

Comment 1 Milos Malik 2021-09-01 07:31:26 UTC
These messages appear every second.

Comment 2 Milos Malik 2021-09-01 07:35:19 UTC
All 3 usbguard* services are running, but usbguard-notifier still complains:

# service usbguard status
Redirecting to /bin/systemctl status usbguard.service
● usbguard.service - USBGuard daemon
   Loaded: loaded (/usr/lib/systemd/system/usbguard.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2021-09-01 09:22:15 CEST; 10min ago
     Docs: man:usbguard-daemon(8)
  Process: 7236 ExecStart=/usr/sbin/usbguard-daemon -f -s -c /etc/usbguard/usbguard-daemon.conf (code=exited, status=0/SUCCESS)
 Main PID: 7238 (usbguard-daemon)
    Tasks: 3 (limit: 11391)
   Memory: 10.4M
   CGroup: /system.slice/usbguard.service
           └─7238 /usr/sbin/usbguard-daemon -f -s -c /etc/usbguard/usbguard-daemon.conf

Sep 01 09:32:45 localhost.localdomain usbguard-daemon[7238]: IPC connection denied: uid=42 gid=42 pid=2310
Sep 01 09:32:46 localhost.localdomain usbguard-daemon[7238]: IPC connection denied: uid=42 gid=42 pid=2310
Sep 01 09:32:47 localhost.localdomain usbguard-daemon[7238]: IPC connection denied: uid=42 gid=42 pid=2310
Sep 01 09:32:48 localhost.localdomain usbguard-daemon[7238]: IPC connection denied: uid=42 gid=42 pid=2310
Sep 01 09:32:49 localhost.localdomain usbguard-daemon[7238]: IPC connection denied: uid=42 gid=42 pid=2310
Sep 01 09:32:50 localhost.localdomain usbguard-daemon[7238]: IPC connection denied: uid=42 gid=42 pid=2310
Sep 01 09:32:51 localhost.localdomain usbguard-daemon[7238]: IPC connection denied: uid=42 gid=42 pid=2310
Sep 01 09:32:52 localhost.localdomain usbguard-daemon[7238]: IPC connection denied: uid=42 gid=42 pid=2310
Sep 01 09:32:53 localhost.localdomain usbguard-daemon[7238]: IPC connection denied: uid=42 gid=42 pid=2310
Sep 01 09:32:54 localhost.localdomain usbguard-daemon[7238]: IPC connection denied: uid=42 gid=42 pid=2310
# service usbguard-dbus status
Redirecting to /bin/systemctl status usbguard-dbus.service
● usbguard-dbus.service - USBGuard D-Bus Service
   Loaded: loaded (/usr/lib/systemd/system/usbguard-dbus.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2021-09-01 09:22:15 CEST; 10min ago
     Docs: man:usbguard-dbus(8)
 Main PID: 7228 (usbguard-dbus)
    Tasks: 4 (limit: 11391)
   Memory: 1.8M
   CGroup: /system.slice/usbguard-dbus.service
           └─7228 /usr/sbin/usbguard-dbus --system

Sep 01 09:22:15 localhost.localdomain systemd[1]: Starting USBGuard D-Bus Service...
Sep 01 09:22:15 localhost.localdomain systemd[1]: Started USBGuard D-Bus Service.
# systemctl --user status usbguard-notifier
● usbguard-notifier.service - USBGuard Notifier
   Loaded: loaded (/usr/lib/systemd/user/usbguard-notifier.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2021-09-01 09:17:11 CEST; 15min ago
 Main PID: 5322 (usbguard-notifi)
    Tasks: 2 (limit: 11391)
   Memory: 2.1M
   CGroup: /user.slice/user-0.slice/user/usbguard-notifier.service
           └─5322 /usr/bin/usbguard-notifier -w

Sep 01 09:17:11 localhost.localdomain systemd[5302]: Started USBGuard Notifier.
Sep 01 09:17:11 localhost.localdomain usbguard-notifier[5322]: Connection has been established
Sep 01 09:22:15 localhost.localdomain usbguard-notifier[5322]: IPC connection failure!IPC connect: service=usbguard: Connection reset by peer
Sep 01 09:22:15 localhost.localdomain usbguard-notifier[5322]: Check if usbguard-daemon is running in the background
Sep 01 09:22:16 localhost.localdomain usbguard-notifier[5322]: Connection has been established
#

Comment 3 Milos Malik 2021-09-01 07:41:38 UTC
# grep -Ri ipc /etc/usbguard/
/etc/usbguard/usbguard-daemon.conf:# IPC interface.
/etc/usbguard/usbguard-daemon.conf:# IPC interface. Usually, we set the option to
/etc/usbguard/usbguard-daemon.conf:#!!!          the daemon will accept IPC connections from   !!!
/etc/usbguard/usbguard-daemon.conf:# Users allowed to use the IPC interface.
/etc/usbguard/usbguard-daemon.conf:# accept IPC connections from.
/etc/usbguard/usbguard-daemon.conf:# IPCAllowedUsers=username1 username2 ...
/etc/usbguard/usbguard-daemon.conf:IPCAllowedUsers=root
/etc/usbguard/usbguard-daemon.conf:# Groups allowed to use the IPC interface.
/etc/usbguard/usbguard-daemon.conf:# accept IPC connections from.
/etc/usbguard/usbguard-daemon.conf:# IPCAllowedGroups=groupname1 groupname2 ...
/etc/usbguard/usbguard-daemon.conf:IPCAllowedGroups=wheel
/etc/usbguard/usbguard-daemon.conf:# IPC access control definition files path.
/etc/usbguard/usbguard-daemon.conf:# This way each file defines who is able to connect to the IPC
/etc/usbguard/usbguard-daemon.conf:IPCAccessControlFiles=/etc/usbguard/IPCAccessControl.d/
#

Comment 4 Milos Malik 2021-09-01 07:46:40 UTC
# journalctl -u usbguard -S today | grep 'IPC connection denied' | wc -l
2212
# journalctl -S today | grep usbguard-notifier | grep 'IPC connection failure' | wc -l
2214
#

Comment 6 Milos Malik 2021-09-01 08:24:08 UTC
Because we ship the usbguard and gdm packages by default, I believe that usbguard configuration should be modified to avoid spamming of the journal.

Comment 7 Milos Malik 2021-09-01 08:41:39 UTC
Reproducible in 1MT on RHEL-8.4 too.

Comment 9 Milos Malik 2021-09-02 08:12:18 UTC
A longer reproducer:
0) get a clean RHEL-8.5 machine
1) yum -y groupinstall "Server with GUI"
2) yum -y install usbguard\*
3) systemctl set-default graphical
4) systemctl enable usbguard
5) systemctl enable usbguard-dbus
6) reboot
7) journalctl -S today -u usbguard | grep 'IPC connection denied'

Comment 28 jiri vanek 2021-10-14 10:18:22 UTC
happy 2*10^6 !

●●●█〓〓██████████▅▄▄▄▄▄▄▄▃▃▃▃▄ 
▄██ 〓 █CONGRATULATION█ 〓 ██▄ 
▄▅█████████████████████████▅▄▃ 
█████████████████████████████◤ 
◥⊙▲⊙▲⊙▲⊙▲⊙▲⊙▲⊙▲⊙▲⊙▲⊙▲⊙▲⊙▲⊙▲⊙▲◤

Sorry for spam!

Comment 32 errata-xmlrpc 2022-05-10 13:36:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (usbguard bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:1779


Note You need to log in before you can comment on or make changes to this bug.