Performing verification for mantic.

I started two VMs. A jammy VM for the cifs server, and a mantic VM, for
the client.

I set the jammy VM up as per the testcase.

I set the mantic VM up as per the testcase.

The mantic VM uses kernel 6.5.0-25-generic from -updates.

$ uname -rv
6.5.0-25-generic #25-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb  7 14:58:39 UTC 2024

I created the testdata, took the SHA256 hash, and copied it over:

$ ( set -o pipefail && head --bytes=$(( 55 * 1000 )) /dev/zero | openssl enc 
-aes-128-ctr -nosalt -pass "pass:my-seed" -iter 1 | hexdump --no-squeezing 
--format '40/1 "%02x"' --format '"\n"' >"testdata.txt" )
$ sha256sum testdata.txt
9ec09af020dce3270ea76531141940106f173c7243b7193a553480fb8500b3f2  testdata.txt
$ cp testdata.txt share/

On the jammy VM, I confirmed the hash has changed:

$ sha256sum sambashare/testdata.txt
9e573a0aa795f9cd4de4ac684a1c056dbc7d2ba5494d02e71b6225ff5f0fd866  
sambashare/testdata.txt
$ less sambashare/testdata.txt

Looking at the file with less, I see the large blocks of zeros.

I then enabled -proposed, and installed 6.5.0-27-generic:

$ uname -rv
6.5.0-27-generic #28-Ubuntu SMP PREEMPT_DYNAMIC Thu Mar  7 18:21:00 UTC 2024

I mounted the share:

$ sudo mount -t cifs -o username=ubuntu,vers=1.0,wsize=16850 
//192.168.122.65/sambashare ~/share
Password for ubuntu@//192.168.122.65/sambashare:

Looking in dmesg, I see:

[   57.280020] Key type cifs.spnego registered
[   57.280035] Key type cifs.idmap registered
[   57.280345] Use of the less secure dialect vers=1.0 is not recommended 
unless required for access to very old servers
[   57.280861] CIFS: VFS: Use of the less secure dialect vers=1.0 is not 
recommended unless required for access to very old servers
[   57.281307] CIFS: VFS: wsize rounded down to 16384 to multiple of PAGE_SIZE 
4096
[   57.281599] CIFS: Attempting to mount //192.168.122.65/sambashare

the line of interest is "CIFS: VFS: wsize rounded down to 16384 to
multiple of PAGE_SIZE 4096" showing we now have a wsize of 16384, and we
can see this with mount -l:

$ mount -l
//192.168.122.65/sambashare on /home/ubuntu/share type cifs 
(rw,relatime,vers=1.0,cache=strict,username=ubuntu,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.122.65,soft,unix,posixpaths,serverino,mapposix,acl,rsize=1048576,wsize=16384,bsize=1048576,echo_interval=60,actimeo=1,closetimeo=1)

I then copied the file over:

$ cp testdata.txt share/

Looking at the SHA256 sum on the Jammy server:

$ sha256sum sambashare/testdata.txt
9ec09af020dce3270ea76531141940106f173c7243b7193a553480fb8500b3f2  
sambashare/testdata.txt

When looking at the file with less, there are no more binary zeros.

The kernel in -proposed fixes the issue, happy to mark verified for
mantic.

** Tags removed: verification-needed-mantic-linux
** Tags added: verification-done-mantic-linux

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2049634

Title:
  smb: wsize blocks of bytes followed with binary zeros on copy,
  destroying data

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2049634/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to