Bug 218543 - CIFS: listxattr() fails with EACCES
Summary: CIFS: listxattr() fails with EACCES
Status: NEW
Alias: None
Product: File System
Classification: Unclassified
Component: CIFS (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: fs_cifs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-01 14:21 UTC by Eugene Korenevsky
Modified: 2024-03-13 12:41 UTC (History)
0 users

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments
proposed patch (1.29 KB, patch)
2024-03-13 12:41 UTC, Eugene Korenevsky
Details | Diff

Description Eugene Korenevsky 2024-03-01 14:21:46 UTC
Windows version of SMB host: Windows Server 2012 R2 x64
Kernel: 6.8.0-rc6 (git://git.samba.org/sfrench/cifs-2.6, d206a76d)
CONFIG_CIFS_XATTR=y in kernel config

Steps to reproduce:

mkdir temp
sudo mount.cifs //192.168.56.130/temp ~/temp/ -o user,username=...,password=...
$ sudo getfattr -d temp

getfattr prints:
getfattr: temp: Permission denied

CIFS debug log:

[  169.784045] CIFS: Status code returned 0xc0000022 STATUS_ACCESS_DENIED
[  169.784649] CIFS: fs/smb/client/smb2maperror.c: Mapping SMB2 status code 0xc0000022 to POSIX err -13
[  169.785428] CIFS: fs/smb/client/xattr.c: VFS: leaving cifs_listxattr (xid = 5) rc = -13

strace output:
listxattr("temp", NULL, 0)              = -1 EACCES (Permission denied)

Required behavior: getfattr executed successfully.

This is a regression. The bug is not reproduced at kernel 5.15.148.
Comment 1 Eugene Korenevsky 2024-03-13 12:41:06 UTC
Created attachment 305986 [details]
proposed patch

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