The Samba-Bugzilla – Attachment 18915 Details for
Bug 16033
CVE-2026-4480 [SECURITY] Unauthenticated Remote Code Execution
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for 4.21
CVE-2026-4480-printing-rce-v4.21-01.patch (text/plain), 1.46 KB, created by
Volker Lendecke
on 2026-03-25 08:33:22 UTC
(
hide
)
Description:
Patch for 4.21
Filename:
MIME Type:
Creator:
Volker Lendecke
Created:
2026-03-25 08:33:22 UTC
Size:
1.46 KB
patch
obsolete
>From 292859821a16932156542cdf790b195a456886a0 Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Sun, 15 Mar 2026 19:15:14 +0100 >Subject: [PATCH] CVE-2026-4480: printing: Shell-sanitize jobname passed as %J > to "print command" > >Fix an unauthenticated remote code execution vulnerability with >printing set to anything *but* cups and iprint, for example "lprng", >so that "print command" is executed upon job submission. If the >client-controlled job name is handed to the "print command" via "%J", >rpcd_spoolssd passes this to the shell without escaping critical >characters. > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=16033 >Signed-off-by: Volker Lendecke <vl@samba.org> >--- > source3/printing/print_generic.c | 15 ++++++++++----- > 1 file changed, 10 insertions(+), 5 deletions(-) > >diff --git a/source3/printing/print_generic.c b/source3/printing/print_generic.c >index a8bf9aff972..1a34a534584 100644 >--- a/source3/printing/print_generic.c >+++ b/source3/printing/print_generic.c >@@ -255,12 +255,17 @@ static int generic_job_submit(int snum, struct printjob *pjob, > return -1; > } > >- jobname = talloc_strdup(ctx, pjob->jobname); >- if (!jobname) { >- ret = -1; >- goto out; >+ { >+ char *name = escape_shell_string(pjob->jobname); >+ if (name == NULL) { >+ ret = -1; >+ goto out; >+ } >+ >+ jobname = talloc_string_sub(ctx, name, "'", "_"); >+ SAFE_FREE(name); > } >- jobname = talloc_string_sub(ctx, jobname, "'", "_"); >+ > if (!jobname) { > ret = -1; > goto out; >-- >2.34.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 16033
:
18903
|
18905
|
18915
|
18916
|
18917
|
18918
|
18919
|
18925
|
18962
|
18968
|
18969
|
18972
|
18973
|
18974
|
18975