View Issue Details

IDProjectCategoryView StatusLast Update
0004369Kali LinuxGeneral Bugpublic2018-09-11 16:48
Reporterzylla Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionsuspended 
Product Version2017.3 
Summary0004369: Kernel bug: cifs mount in /etc/fstab causes kernel to crash during boot.
Description

I have these lines in /etc/fstab, that uses cifs to mount some remote dirs.
After upgrading to kernel version: "4.13.0-kali1-amd64" the kernel crashes during each boot, and cifs is mentioned in the error messages.

Steps To Reproduce

Removing these lines from /etc/fstab fixes the issue.

//192.168.1.2/NAS_root /mnt/smb cifs credentials=/root/.smbcredentials,uid=0,gid=0,iocharset=utf8,noperm 0 0
//192.168.1.2/OpenWRT /mnt/openwrt cifs credentials=/root/.smbcredentials,uid=0,gid=0,iocharset=utf8,noperm 0 0
//192.168.1.2/World040of040Warcraft /mnt/wow cifs credentials=/root/.smbcredentials,uid=0,iocharset=utf8,noperm 0 0

Additional Information

I'm not sure if it's related to the issue, but i'm using wifi.
So my network is most likely not up at the time fstab tries to mount the dirs. making 192.168.1.2 un-available.
Not sure if this helps with debugging the issue.

Attached Files

Activities

roadkill

roadkill

2018-01-23 19:25

reporter   ~0007862

the issue is due to upstream modifications,
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/fs/cifs?id=eef914a9eb5eb83e60eb498315a491cd1edc13a1

eef914a9eb5eb83e60eb498315a491cd1edc13a1.patch (1,695 bytes)   
From eef914a9eb5eb83e60eb498315a491cd1edc13a1 Mon Sep 17 00:00:00 2001
From: Steve French <[email protected]>
Date: Sat, 8 Jul 2017 17:30:41 -0500
Subject: [SMB3] Improve security, move default dialect to SMB3 from old CIFS

Due to recent publicity about security vulnerabilities in the
much older CIFS dialect, move the default dialect to the
widely accepted (and quite secure) SMB3.0 dialect from the
old default of the CIFS dialect.

We do not want to be encouraging use of less secure dialects,
and both Microsoft and CERT now strongly recommend not using the
older CIFS dialect (SMB Security Best Practices
"recommends disabling SMBv1").

SMB3 is both secure and widely available: in Windows 8 and later,
Samba and Macs.

Users can still choose to explicitly mount with the less secure
dialect (for old servers) by choosing "vers=1.0" on the cifs
mount

Signed-off-by: Steve French <[email protected]>
Reviewed-by: Pavel Shilovsky <[email protected]>
---
 fs/cifs/connect.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'fs/cifs')

diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 6ab261cd..59647eb 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1272,9 +1272,9 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
 
 	vol->actimeo = CIFS_DEF_ACTIMEO;
 
-	/* FIXME: add autonegotiation -- for now, SMB1 is default */
-	vol->ops = &smb1_operations;
-	vol->vals = &smb1_values;
+	/* FIXME: add autonegotiation for SMB3 or later rather than just SMB3 */
+	vol->ops = &smb30_operations; /* both secure and accepted widely */
+	vol->vals = &smb30_values;
 
 	vol->echo_interval = SMB_ECHO_INTERVAL_DEFAULT;
 
-- 
cgit v1.1

rhertzog

rhertzog

2018-01-24 08:47

administrator   ~0007863

@roadkill you need to explain this better, the change of the default version of the SMB protocol used does not translate into a kernel crash for me.

roadkill

roadkill

2018-01-24 09:36

reporter   ~0007864

@rhertzog since the default were changed to actually mount cifs you need to include the vers=1.0 so yes a kernel crash is not the expected result but this should be a working, you can also revert the patch for the kernel to restore old behavior.

e.g.
mount -t cifs -o vers=1.0,username=myuser,pass=mypass //192.168.1.100/share /mnt/myshare

that way the crash would be prevented

roadkill

roadkill

2018-01-24 10:24

reporter   ~0007865

@rhertzog unfortunately there are multiple bugs related with cifs mounting and kernel crashes, this is a workaround and not a solution

g0tmi1k

g0tmi1k

2018-09-11 16:48

administrator   ~0009661

Due to the age of the OS (Kali Moto [v1], Kali Safi [v2], Kali Rolling 2016.x/2017.x), these legacy versions are no longer supported.
We will be closing this ticket due to inactivity.

Please could you see if you are able to replicate this issue with the latest version of Kali Linux - https://www.kali.org/downloads/)?

If you are still facing the same problem, feel free to re-open the ticket. If you choose to do this, could you provide more information to the issue you are facing,and also give information about your setup?
For more information, please read: https://kali.training/topic/filing-a-good-bug-report/

Issue History

Date Modified Username Field Change
2017-11-27 17:58 zylla New Issue
2017-12-01 21:23 anders113345 Issue cloned: 0004381
2018-01-23 19:25 roadkill File Added: eef914a9eb5eb83e60eb498315a491cd1edc13a1.patch
2018-01-23 19:25 roadkill Note Added: 0007862
2018-01-24 08:47 rhertzog Note Added: 0007863
2018-01-24 09:36 roadkill Note Added: 0007864
2018-01-24 10:24 roadkill Note Added: 0007865
2018-09-11 16:48 g0tmi1k Status new => closed
2018-09-11 16:48 g0tmi1k Resolution open => suspended
2018-09-11 16:48 g0tmi1k Note Added: 0009661