Bug 1962920 - libcap-ng used by "/usr/sbin/mount.cifs" failed due to not having CAP_SETPCAP in capng_apply
Summary: libcap-ng used by "/usr/sbin/mount.cifs" failed due to not having CAP_SETPCAP...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: cifs-utils
Version: 34
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: ronnie sahlberg
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-20 19:19 UTC by Joerg K
Modified: 2022-02-10 07:35 UTC (History)
16 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-02-10 07:35:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Joerg K 2021-05-20 19:19:10 UTC
Description of problem:
The following error messages shows up in journald while the mount operation succeeded: "Mai 20 20:42:29 t14s mount.cifs[11933]: libcap-ng used by "/usr/sbin/mount.cifs" failed due to not having CAP_SETPCAP in capng_apply"

The error shows up several times. Probably each time I access some cifs share.

Version-Release number of selected component (if applicable):
~~~
$ rpm -q cifs-utils libcap-ng
cifs-utils-6.11-3.fc34.x86_64
libcap-ng-0.8.2-4.fc34.x86_64
~~~

How reproducible:
It seems to appear every time I access some cifs share.

Steps to Reproduce:
1. Access cifs share
2. sudo journalctl -p err

Actual results:
"libcap-ng used by "/usr/sbin/mount.cifs" failed due to not having CAP_SETPCAP in capng_apply"

Expected results:
Since the operation succeeds IMHO there should no error be reported.

Additional info:
This might be related to: https://bugzilla.redhat.com/show_bug.cgi?id=1924218

Comment 1 Ryan Drew 2021-06-03 15:48:17 UTC
I was having the same issue. After doing some research it seems that this issue was addressed in cifs-utils 6.12 by commit e406fb1 [1]. Upgrading cifs-utils by uninstalling 6.11 and then building directly from source [2][3] fixed the issue for me. See also [4] for discussion on libcap-ng's GitHub.

[1]: https://git.samba.org/cifs-utils.git/?p=cifs-utils.git;a=commit;h=e406fb13e5b08b440100ec6215973060b7fdcff3
[2]: https://www.linuxfromscratch.org/blfs/view/svn/basicnet/cifsutils.html
[3]: https://github.com/piastry/cifs-utils
[4]: https://github.com/stevegrubb/libcap-ng/issues/21

Comment 2 Davide Repetto 2021-06-10 09:15:31 UTC
Here here. Same problem.
And I confirm that the fix upstream works for me too.

Comment 3 Joerg 2021-06-11 19:27:09 UTC
(In reply to Ryan Drew from comment #1)
> I was having the same issue. After doing some research it seems that this
> issue was addressed in cifs-utils 6.12 by commit e406fb1 [1]. Upgrading
> cifs-utils by uninstalling 6.11 and then building directly from source
> [2][3] fixed the issue for me.
[...]
> [1]:
> https://git.samba.org/cifs-utils.git/?p=cifs-utils.git;a=commit;
> h=e406fb13e5b08b440100ec6215973060b7fdcff3
> [2]: https://www.linuxfromscratch.org/blfs/view/svn/basicnet/cifsutils.html
> [3]: https://github.com/piastry/cifs-utils

I can confirm that the upstream fix works, too.

I've build and installed `cifs-utils` using the following procedure:

1. $ sudo dnf install autoconf automake
2. $ git clone https://github.com/piastry/cifs-utils.git
3. $ cd cifs-utils/
4. $ autoreconf -i
5. $ ./configure
6. $ make
7. $ sudo dnf remove cifs-utils
8. $ sudo make install
--> Issue fixed.

It would be awesome when the fix could be backported or the fedora package could be rebased.

Comment 4 Alexander Bokovoy 2021-06-12 08:06:48 UTC
I'll check with upstream next week for a new release as there is one more patch needed to offset the issues caused by the 6.12 release fixes.

Comment 5 Joerg 2021-07-04 11:19:05 UTC
(In reply to Alexander Bokovoy from comment #4)
> I'll check with upstream next week for a new release as there is one more
> patch needed to offset the issues caused by the 6.12 release fixes.

Hello @abokovoy, Did you have the chance to check with upstream yet? Are you provide information on how or when this might get fixed?

Best regards,  
Joerg

Comment 6 Alexander Bokovoy 2021-07-06 06:35:57 UTC
Hi Joerg,

yes, I've got response from the upstream maintainer. Due to some personal life changes, he hadn't have time to work on it yet. However, there is a chance to have a new release in couple weeks, hopefully.

Comment 7 John W Smith 2021-09-12 21:27:08 UTC
Just confirming this issue still exists in cifs-utils-6.11-4.fc35.x86_64. My situation is a little different, the error is the same but the mount fails. So I can't mount a CIFS share at all. :(

Log message:

Sep 12 17:23:25 sg9 mount.cifs[64519]: libcap-ng used by "/usr/sbin/mount.cifs" failed due to not having CAP_SETPCAP in capng_apply
Sep 12 17:23:25 sg9 kernel: CIFS: VFS: cifs_mount failed w/return code = -22

Comment 8 Bruno Wolff III 2021-09-23 02:49:39 UTC
I upgraded the package to 6.13 because there was a CVE fixed in that release. I was looking at this to do a private upgrade to get an enhancement, but with the CVE I thought it was reasonable to do a real upgrade in Fedora. There are builds for f3, f34, f35 and rawhide available in koji. They will be in testing and rawhide as new composes get done.
I'll leave this bug open for a bit for feedback.

Comment 9 Alexander Bokovoy 2022-02-10 07:35:50 UTC
I have updated cifs-utils to 6.14 in F36-Rawhide. Since we have had no feedback for past four months I am closing this bug.


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