Bug 2107579 - CIFS: VFS: cifs_mount failed w/return code = -22 regression from kernel 5.17.13-300
Summary: CIFS: VFS: cifs_mount failed w/return code = -22 regression from kernel 5.17....
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 36
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-15 12:56 UTC by Nils
Modified: 2022-07-23 02:00 UTC (History)
19 users (show)

Fixed In Version: kernel-5.18.13-200.fc36
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-23 02:00:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
dmesg (195.66 KB, text/plain)
2022-07-15 12:56 UTC, Nils
no flags Details

Description Nils 2022-07-15 12:56:56 UTC
Created attachment 1897378 [details]
dmesg

1. Please describe the problem:
Mounting a CIFS share fails with dmesg error "VFS: cifs_mount failed w/return code = -22".

Booting with 5.17.13-300 mounts the share without problems.
Server is samba 4.13.13+dfsg-1~deb11u4 (debian bullseye)


2. What is the Version-Release number of the kernel:
5.18.10-200; 5.18.11-200


3. Did it work previously in Fedora? If so, what kernel version did the issue
   *first* appear?  Old kernels are available for download at
   https://koji.fedoraproject.org/koji/packageinfo?packageID=8 :
Works with kernel 5.17.13-300

4. Can you reproduce this issue? If so, please provide the steps to reproduce
   the issue below:
mount.cifs -o credentials=/home/xxx/.smbcredentials //server/xxx /srv/xxx

5. Does this problem occur with the latest Rawhide kernel? To install the
   Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by
   ``sudo dnf update --enablerepo=rawhide kernel``:
does not work with 5.19.0-0.rc6.20220713gitb047602d579b.48.fc37.x86_64


6. Are you running any modules that not shipped with directly Fedora's kernel?:
no

7. Please attach the kernel logs. You can get the complete kernel log
   for a boot with ``journalctl --no-hostname -k > dmesg.txt``. If the
   issue occurred on a previous boot, use the journalctl ``-b`` flag.



Log from samba:
[2022/07/15 14:39:55.544383,  5, pid=5911, effective(0, 0), real(0, 0)] ../../source3/auth/token_util.c:873(debug_unix_user_token)
  UNIX token of user 0
  Primary group is 0 and contains 0 supplementary groups
[2022/07/15 14:39:55.544399,  5, pid=5911, effective(0, 0), real(0, 0)] ../../source3/smbd/uid.c:493(smbd_change_to_root_user)
  change_to_root_user: now uid=(0,0) gid=(0,0)
[2022/07/15 14:39:55.544410,  3, pid=5911, effective(0, 0), real(0, 0), class=smb2] ../../source3/smbd/smb2_server.c:3861(smbd_smb2_request_error_ex)
  smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_INVALID_PARAMETER] || at ../../source3/smbd/smb2_negprot.c:258
[2022/07/15 14:39:55.544422, 10, pid=5911, effective(0, 0), real(0, 0), class=smb2] ../../source3/smbd/smb2_server.c:3747(smbd_smb2_request_done_ex)
  smbd_smb2_request_done_ex: mid [0] idx[1] status[NT_STATUS_INVALID_PARAMETER] body[8] dyn[yes:1] at ../../source3/smbd/smb2_server.c:3911
[2022/07/15 14:39:55.544429, 10, pid=5911, effective(0, 0), real(0, 0), class=smb2_credits] ../../source3/smbd/smb2_server.c:963(smb2_set_operation_credit)
  smb2_set_operation_credit: smb2_set_operation_credit: requested 10, charge 1, granted 1, current possible/max 8192/8192, total granted/max/low/range 1/8192/1/1
[2022/07/15 14:39:55.680034, 10, pid=5911, effective(0, 0), real(0, 0), class=smb2] ../../source3/smbd/smb2_server.c:1634(smbd_server_connection_terminate_ex)
  smbd_server_connection_terminate_ex: conn[ipv4:172.16.10.158:58116] num_ok[0] reason[NT_STATUS_END_OF_FILE] at ../../source3/smbd/smb2_server.c:4942
[2022/07/15 14:39:55.680126,  4, pid=5911, effective(0, 0), real(0, 0)] ../../source3/smbd/sec_ctx.c:319(set_sec_ctx_internal)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2022/07/15 14:39:55.680135,  5, pid=5911, effective(0, 0), real(0, 0)] ../../libcli/security/security_token.c:52(security_token_debug)
  Security token: (NULL)
[2022/07/15 14:39:55.680143,  5, pid=5911, effective(0, 0), real(0, 0)] ../../source3/auth/token_util.c:873(debug_unix_user_token)
  UNIX token of user 0
  Primary group is 0 and contains 0 supplementary groups
[2022/07/15 14:39:55.680164,  5, pid=5911, effective(0, 0), real(0, 0)] ../../source3/smbd/uid.c:493(smbd_change_to_root_user)
  change_to_root_user: now uid=(0,0) gid=(0,0)
[2022/07/15 14:39:55.680171,  4, pid=5911, effective(0, 0), real(0, 0)] ../../source3/smbd/sec_ctx.c:319(set_sec_ctx_internal)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2022/07/15 14:39:55.680176,  5, pid=5911, effective(0, 0), real(0, 0)] ../../libcli/security/security_token.c:52(security_token_debug)
  Security token: (NULL)
[2022/07/15 14:39:55.680190,  5, pid=5911, effective(0, 0), real(0, 0)] ../../source3/auth/token_util.c:873(debug_unix_user_token)
  UNIX token of user 0
  Primary group is 0 and contains 0 supplementary groups
[2022/07/15 14:39:55.680199,  5, pid=5911, effective(0, 0), real(0, 0)] ../../source3/smbd/uid.c:493(smbd_change_to_root_user)
  change_to_root_user: now uid=(0,0) gid=(0,0)
[2022/07/15 14:39:55.680207,  4, pid=5911, effective(0, 0), real(0, 0)] ../../source3/smbd/sec_ctx.c:319(set_sec_ctx_internal)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2022/07/15 14:39:55.680212,  5, pid=5911, effective(0, 0), real(0, 0)] ../../libcli/security/security_token.c:52(security_token_debug)
  Security token: (NULL)
[2022/07/15 14:39:55.680217,  5, pid=5911, effective(0, 0), real(0, 0)] ../../source3/auth/token_util.c:873(debug_unix_user_token)
  UNIX token of user 0
  Primary group is 0 and contains 0 supplementary groups
[2022/07/15 14:39:55.680225,  5, pid=5911, effective(0, 0), real(0, 0)] ../../source3/smbd/uid.c:493(smbd_change_to_root_user)
  change_to_root_user: now uid=(0,0) gid=(0,0)
[2022/07/15 14:39:55.680235, 10, pid=5911, effective(0, 0), real(0, 0)] ../../source3/smbd/smbXsrv_session.c:1781(smbXsrv_session_logoff_all)
  smbXsrv_session_logoff_all: empty session_table, nothing to do.
[2022/07/15 14:39:55.680240,  4, pid=5911, effective(0, 0), real(0, 0)] ../../source3/smbd/sec_ctx.c:319(set_sec_ctx_internal)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2022/07/15 14:39:55.680245,  5, pid=5911, effective(0, 0), real(0, 0)] ../../libcli/security/security_token.c:52(security_token_debug)
  Security token: (NULL)
[2022/07/15 14:39:55.680250,  5, pid=5911, effective(0, 0), real(0, 0)] ../../source3/auth/token_util.c:873(debug_unix_user_token)
  UNIX token of user 0
  Primary group is 0 and contains 0 supplementary groups
[2022/07/15 14:39:55.680258,  5, pid=5911, effective(0, 0), real(0, 0)] ../../source3/smbd/uid.c:493(smbd_change_to_root_user)
  change_to_root_user: now uid=(0,0) gid=(0,0)
[2022/07/15 14:39:55.680267,  4, pid=5911, effective(0, 0), real(0, 0)] ../../source3/smbd/sec_ctx.c:319(set_sec_ctx_internal)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2022/07/15 14:39:55.680272,  5, pid=5911, effective(0, 0), real(0, 0)] ../../libcli/security/security_token.c:52(security_token_debug)
  Security token: (NULL)
[2022/07/15 14:39:55.680277,  5, pid=5911, effective(0, 0), real(0, 0)] ../../source3/auth/token_util.c:873(debug_unix_user_token)
  UNIX token of user 0
  Primary group is 0 and contains 0 supplementary groups
[2022/07/15 14:39:55.680285,  5, pid=5911, effective(0, 0), real(0, 0)] ../../source3/smbd/uid.c:493(smbd_change_to_root_user)
  change_to_root_user: now uid=(0,0) gid=(0,0)
[2022/07/15 14:39:55.680321, 10, pid=5911, effective(0, 0), real(0, 0)] ../../lib/messaging/messages_dgm_ref.c:163(msg_dgm_ref_destructor)
  msg_dgm_ref_destructor: refs=(nil)
[2022/07/15 14:39:55.680480,  3, pid=5911, effective(0, 0), real(0, 0)] ../../source3/smbd/server_exit.c:220(exit_server_common)
  Server exit (NT_STATUS_END_OF_FILE)

Comment 1 Stephane Travostino 2022-07-15 16:34:03 UTC
Same issue here on Silverblue. This is quite urgent as CIFS mount are pretty much unusable.

A workaround is adding the `compress` mount option. See also: https://lore.kernel.org/all/87edz63t11.fsf@cjr.nz/T/

Comment 2 Stephane Travostino 2022-07-15 16:35:50 UTC
Forcing `vers=2.0` or `vers=3.02` seems to work for me as well. See also: https://bbs.archlinux.org/viewtopic.php?id=277722

Comment 3 Fedora Update System 2022-07-22 20:55:39 UTC
FEDORA-2022-311e6b1153 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-311e6b1153

Comment 4 Fedora Update System 2022-07-23 02:00:09 UTC
FEDORA-2022-311e6b1153 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.


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