CIFS VFS: error -22 on ioctl to get interface list
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux-azure (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Problem:
Following error logged when mounting Azure file share with CIFS 3.0 protocol.
[ 4856.227895] CIFS VFS: error -22 on ioctl to get interface list
It looks like linux-azure kernel > 5 has some cifs bug. (It might be reproducible with a upstream kernel as well.)
This is not reproducible with -o 2.1 mount option or linux-azure 4.15.
And It can be easily reproducible with platform image like Canonical:
What I have done to reproduce:
VM create CLI command
$ az vm create --resource-group rgname --name cifsubuntu --image Canonical:
mount command
# mount -t cifs //accountname.
Do you have any knowledge about this?
As far as I research, SMB2_ioctl which is in cifs kernel module send some invalid parameter to the server.
Here is a debug log.
[ 156.667830] SMB2_ioctl:2506: /build/
[ 156.667836] smb3_init_
[ 156.667840] __smb_send_
[ 156.668906] cifs_demultiple
[ 156.668914] decrypt_
[ 156.668915] receive_
[ 156.668916] smb2_calc_size:421: /build/
[ 156.668917] smb2_calc_size:439: /build/
[ 156.668918] smb2_add_
[ 156.668924] cifs_sync_
[ 156.668925] Status code returned 0xc000000d STATUS_
[ 156.668929] map_smb2_
[ 156.668930] cifs_small_
[ 156.668931] CIFS VFS: error -22 on ioctl to get interface list
To enable the debug, I have done following command before mount.
# modprobe cifs
# echo 'module cifs +lfp' > /sys/kernel/
# echo 'file fs/cifs/* +lfp' > /sys/kernel/
# echo 7 > /proc/fs/
I am not sure but it looks like following SMB2_ioctl has some invalid argument.
"fs/cifs/smb2ops.c"
516 static int
517 SMB3_request_
518 {
519 int rc;
520 unsigned int ret_data_len = 0;
521 struct network_
522 struct cifs_server_iface *iface_list;
523 size_t iface_count;
524 struct cifs_ses *ses = tcon->ses;
525
526 rc = SMB2_ioctl(xid, tcon, NO_FILE_ID, NO_FILE_ID,
527 FSCTL_QUERY_
528 NULL /* no data input */, 0 /* no data input */,
529 (char **)&out_buf, &ret_data_len);
530 if (rc == -EOPNOTSUPP) {
531 cifs_dbg(FYI,
532 "server does not support query network interfaces\n");
533 goto out;
534 } else if (rc != 0) {
535 cifs_dbg(VFS, "error %d on ioctl to get interface list\n", rc);
536 goto out;