Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAS-132685 / Fix memory context for IPC read allocations #438

Merged
merged 1 commit into from
Nov 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
samba (2:4.20.5+ix-2) unstable; urgency=medium

* Fix memory context for IPC read allocations

-- Andrew Walker <awalker@ixsystems.com> Fri, 22 Nov 2024 17:00:00 +0000


samba (2:4.20.5+ix-1) unstable; urgency=medium

* Change memory context for read buffer allocations
Expand Down
5 changes: 3 additions & 2 deletions source3/smbd/smb2_read.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,9 @@ static struct tevent_req *smbd_smb2_read_send(TALLOC_CTX *mem_ctx,
struct tevent_req *subreq = NULL;
bool ok;

state->out_data = data_blob_talloc(state, NULL, in_length);
if (in_length > 0 && tevent_req_nomem(state->out_data.data, req)) {
if (!io_pool_alloc_blob(fsp->conn, smb2req, in_length, &state->out_data,
&state->io_lnk)) {
tevent_req_nomem(NULL, req);
return tevent_req_post(req, ev);
}

Expand Down