CIFS accesses DFS referral with wrong Kerberos ticket

Bug #1862858 reported by steveb
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

kubuntu 19.10 with kernel 5.3.0-29-generic and64.

This looks like a regression in the kernel CIFS module after the 4.15 & 5.0 kernels.
These earlier kernels follow the DFS referrals without error.

The problem:
- Use mount.cifs with kerberos authentication to mount a samba server hosting a DFS root.
  You will get a KRB ticket for the "dfs_root" machine.
- Attempt to access a host a host via a DFS referral (call this "target_host")
- Access will fail with "Permission Denied".
- Use Wireshark to monitor CIFS and KRB traffic.
- The kernel attempts to authenticate to "target_host" using the KRB ticket for "dfs_root".
Note:
 - A DFS target running Win2008R2 will reply with STATUS_MORE_PROCESSING_REQUIRED, then the
   kernel will get a KRB ticket for "target_host" and use it.
   The connection is then successful.
 - A DFS target running Samba 4.7.6 will reply with STATUS_LOGON_FAILURE.
   The connection fails.

Expected Result:
- Successful connection.
- The kernel should get a KRB ticket for "target_host" and use it.
  (This is what kernels 4.15 and 5.0 do [and a Windows client])
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu8.2
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC3: stephen 1839 F.... pulseaudio
 /dev/snd/controlC2: stephen 1839 F.... pulseaudio
 /dev/snd/controlC0: stephen 1839 F.... pulseaudio
 /dev/snd/controlC1: stephen 1839 F.... pulseaudio
CurrentDesktop: KDE
DistroRelease: Ubuntu 19.10
HibernationDevice: RESUME=UUID=4df5ccea-5eb4-45e3-a0b0-7b1311fdaba5
InstallationDate: Installed on 2018-11-09 (459 days ago)
InstallationMedia: Kubuntu 18.10 "Cosmic Cuttlefish" - Release amd64 (20181017.2)
MachineType: Gigabyte Technology Co., Ltd. GA-MA790X-UD4P
NonfreeKernelModules: nvidia_modeset nvidia
Package: linux (not installed)
ProcFB: 0 VESA VGA
ProcKernelCmdLine: BOOT_IMAGE=/@/boot/vmlinuz-5.3.0-29-generic root=UUID=f009da0b-176e-49e6-a6a0-bb594e6754a8 ro rootflags=subvol=@
ProcVersionSignature: Ubuntu 5.3.0-29.31-generic 5.3.13
RelatedPackageVersions:
 linux-restricted-modules-5.3.0-29-generic N/A
 linux-backports-modules-5.3.0-29-generic N/A
 linux-firmware 1.183.3
RfKill:

Tags: eoan
Uname: Linux 5.3.0-29-generic x86_64
UpgradeStatus: Upgraded to eoan on 2019-10-20 (114 days ago)
UserGroups: adm bacula cdrom kvm libvirt lpadmin plugdev sambashare sudo wireshark
_MarkForUpload: True
dmi.bios.date: 09/08/2010
dmi.bios.vendor: Award Software International, Inc.
dmi.bios.version: F10c
dmi.board.name: GA-MA790X-UD4P
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.modalias: dmi:bvnAwardSoftwareInternational,Inc.:bvrF10c:bd09/08/2010:svnGigabyteTechnologyCo.,Ltd.:pnGA-MA790X-UD4P:pvr:rvnGigabyteTechnologyCo.,Ltd.:rnGA-MA790X-UD4P:rvrx.x:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvr:
dmi.product.name: GA-MA790X-UD4P
dmi.sys.vendor: Gigabyte Technology Co., Ltd.

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1862858

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: eoan
Revision history for this message
steveb (tniagcpm) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
steveb (tniagcpm) wrote : CRDA.txt

apport information

Revision history for this message
steveb (tniagcpm) wrote : CurrentDmesg.txt

apport information

Revision history for this message
steveb (tniagcpm) wrote : IwConfig.txt

apport information

Revision history for this message
steveb (tniagcpm) wrote : Lspci.txt

apport information

Revision history for this message
steveb (tniagcpm) wrote : Lsusb.txt

apport information

Revision history for this message
steveb (tniagcpm) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
steveb (tniagcpm) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
steveb (tniagcpm) wrote : ProcEnviron.txt

apport information

Revision history for this message
steveb (tniagcpm) wrote : ProcInterrupts.txt

apport information

Revision history for this message
steveb (tniagcpm) wrote : ProcModules.txt

apport information

Revision history for this message
steveb (tniagcpm) wrote : PulseList.txt

apport information

Revision history for this message
steveb (tniagcpm) wrote : UdevDb.txt

apport information

Revision history for this message
steveb (tniagcpm) wrote : WifiSyslog.txt

apport information

Revision history for this message
steveb (tniagcpm) wrote :

I tried running kernel 5.4.0-14-generic from the focal repositories.
The behavior is the same as with a 5.3 kernel.

summary: - CIFS acesses DFS referral with wrong Kerberos ticket
+ CIFS accesses DFS referral with wrong Kerberos ticket
steveb (tniagcpm)
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Cane you please test 5.4.0-21.25 from focal-proposed? Thanks.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
steveb (tniagcpm) wrote :

I have tested 5.4.0-21.25 from focal-proposed.
The DFS referrals work correctly.

steveb (tniagcpm)
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.