Bug 14696 - SMB1 SMBsplwr doesn't send a reply packet on success.
Summary: SMB1 SMBsplwr doesn't send a reply packet on success.
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Printing (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-29 16:57 UTC by Jeremy Allison
Modified: 2021-05-03 09:18 UTC (History)
1 user (show)

See Also:


Attachments
git-am fix for master. (829 bytes, patch)
2021-04-29 17:16 UTC, Jeremy Allison
no flags Details
git-am fix for master including test. (8.80 KB, patch)
2021-04-29 20:36 UTC, Jeremy Allison
no flags Details
git-am fix for 4.14.next, 4.13.next. (1.04 KB, patch)
2021-04-29 21:46 UTC, Jeremy Allison
slow: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Allison 2021-04-29 16:57:31 UTC

    
Comment 1 Jeremy Allison 2021-04-29 16:59:24 UTC
The code that replies to an SMB1 SMBsplwr request is missing the code that sets up a reply buffer. Has been broken since 3.2.0 and someone just noticed :-).

https://lists.samba.org/archive/samba/2021-April/235789.html

Have fix, need bug-number.
Comment 2 Jeremy Allison 2021-04-29 17:16:12 UTC
Created attachment 16600 [details]
git-am fix for master.

Patch in ci.
Comment 3 Jeremy Allison 2021-04-29 19:01:39 UTC
Confirmed as fixed by submitter.

Date: Thu, 29 Apr 2021 20:46:51 +0200
From: Mateusz Mikołajczyk <mikolajczyk.mateusz@gmail.com>
To: Jeremy Allison <jra@samba.org>
Cc: samba@lists.samba.org
Subject: Re: [Samba] smbsrv_reply_printwrite not returning a response causing the print job to be truncated to 124 bytes

amazing - works as expected :) thank you so much !!

would you like me to create a patch / pull request? on the other hand I
don't think it would be fair since you created it..

kind regards,
Comment 4 Jeremy Allison 2021-04-29 20:36:24 UTC
Created attachment 16602 [details]
git-am fix for master including test.

This includes the test for reference. Note I'm not planning to actually add this test to master, as it will really complicate removing the SMB1 code eventually.

I wrote it for my own understanding and edification :-).

I'm just going to push the raw fix to master, then create back-ports for supported versions.
Comment 5 Samba QA Contact 2021-04-29 21:28:06 UTC
This bug was referenced in samba master:

47d79d7e7e406f7dd204ded7c72cfed3e0761ad5
Comment 6 Jeremy Allison 2021-04-29 21:46:51 UTC
Created attachment 16603 [details]
git-am fix for 4.14.next, 4.13.next.

Cherry-picked from master.
Comment 7 Ralph Böhme 2021-04-30 05:03:49 UTC
Reassigning to Karolin for inclusion in 4.13 and 4.14.
Comment 8 Karolin Seeger 2021-05-03 07:16:43 UTC
(In reply to Ralph Böhme from comment #7)
Pushed to autobuild-v4-{14,13}-test.
Comment 9 Samba QA Contact 2021-05-03 08:17:20 UTC
This bug was referenced in samba v4-14-test:

0ce7c5e7a6298f0f97129ec4e0889b1889d4bdcd
Comment 10 Samba QA Contact 2021-05-03 09:07:03 UTC
This bug was referenced in samba v4-13-test:

aae24152b8d4691252fb56b095ed892e11b40bec
Comment 11 Karolin Seeger 2021-05-03 09:18:39 UTC
Pushed to both branches.
Closing out bug report.

Thanks!