Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag '6.13-rc7-SMB3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

- fix double free when reconnect racing with closing session

- fix SMB1 reconnect with password rotation

* tag '6.13-rc7-SMB3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
smb: client: fix double free of TCP_Server_Info::hostname
cifs: support reconnect with alternate password for SMB1

+11 -3
+10 -1
fs/smb/client/cifssmb.c
··· 152 152 spin_unlock(&ses->ses_lock); 153 153 154 154 rc = cifs_negotiate_protocol(0, ses, server); 155 - if (!rc) 155 + if (!rc) { 156 156 rc = cifs_setup_session(0, ses, server, ses->local_nls); 157 + if ((rc == -EACCES) || (rc == -EHOSTDOWN) || (rc == -EKEYREVOKED)) { 158 + /* 159 + * Try alternate password for next reconnect if an alternate 160 + * password is available. 161 + */ 162 + if (ses->password2) 163 + swap(ses->password2, ses->password); 164 + } 165 + } 157 166 158 167 /* do we need to reconnect tcon? */ 159 168 if (rc || !tcon->need_reconnect) {
+1 -2
fs/smb/client/connect.c
··· 1044 1044 /* Release netns reference for this server. */ 1045 1045 put_net(cifs_net_ns(server)); 1046 1046 kfree(server->leaf_fullpath); 1047 + kfree(server->hostname); 1047 1048 kfree(server); 1048 1049 1049 1050 length = atomic_dec_return(&tcpSesAllocCount); ··· 1671 1670 kfree_sensitive(server->session_key.response); 1672 1671 server->session_key.response = NULL; 1673 1672 server->session_key.len = 0; 1674 - kfree(server->hostname); 1675 - server->hostname = NULL; 1676 1673 1677 1674 task = xchg(&server->tsk, NULL); 1678 1675 if (task)