Re: [regression 6.1.80+] "CIFS: VFS: directory entry name would overflow frame end of buf" and invisible files under certain conditions and at least with noserverino mount option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Paulo,

Thanks a lot for your time on looking into it.

On Wed, Apr 17, 2024 at 07:58:56PM -0300, Paulo Alcantara wrote:
> Hi Salvatore,
> 
> Salvatore Bonaccorso <carnil@xxxxxxxxxx> writes:
> 
> > In Debian we got two reports of cifs mounts not functioning, hiding
> > certain files. The two reports are:
> >
> > https://bugs.debian.org/1069102
> > https://bugs.debian.org/1069092
> >
> > On those cases kernel logs error
> >
> > [   23.225952] CIFS: VFS: directory entry name would overflow frame end of buf 00000000a44b272c
> 
> I couldn't reproduce it.  Does the following fix your issue:
> 
> diff --git a/fs/smb/client/smb2pdu.c b/fs/smb/client/smb2pdu.c
> index 4c1231496a72..3ee35430595e 100644
> --- a/fs/smb/client/smb2pdu.c
> +++ b/fs/smb/client/smb2pdu.c
> @@ -5083,7 +5083,7 @@ smb2_parse_query_directory(struct cifs_tcon *tcon,
>  		info_buf_size = sizeof(struct smb2_posix_info);
>  		break;
>  	case SMB_FIND_FILE_FULL_DIRECTORY_INFO:
> -		info_buf_size = sizeof(FILE_FULL_DIRECTORY_INFO);
> +		info_buf_size = sizeof(FILE_FULL_DIRECTORY_INFO) - 1;
>  		break;
>  	default:
>  		cifs_tcon_dbg(VFS, "info level %u isn't supported\n",
> 
> If not, please provide network trace and verbose logs.

Yes that appears to fix the issue.

But as you say you are not able to reproduce the issue, I guess we
need to try to get it clearly reproducible first to see we face no
other fallouts?

Regards,
Salvatore




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux