Bug 14696 - SMB1 SMBsplwr doesn't send a reply packet on success.
Summary: SMB1 SMBsplwr doesn't send a reply packet on success.
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
Depends on:
Reported: 2021-04-29 16:57 UTC by Jeremy Allison
Modified: 2021-06-01 07:26 UTC (History)
1 user (show)

See Also:

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+

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 :-).


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:

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:

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

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

Comment 12 Samba QA Contact 2021-05-11 09:48:15 UTC
This bug was referenced in samba v4-13-stable:

Comment 13 Samba QA Contact 2021-06-01 07:26:01 UTC
This bug was referenced in samba v4-14-stable (Release samba-4.14.5):