webp_transform: ImageMagick runs without a security policy
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start at the webp_transform initialization path and inspect has_signature_for() plus the existing ImageMagick setup. Trace SetMagickSecurityPolicy() behavior and host-policy interactions, including process-wide effects on other ImageMagick users. Done means the plugin enforces the stated coder, delegate, filter, path, frame, and limit policy, logs incompatible host settings, and disables itself when installation or required formats fail.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
webp_transform passes origin response bodies to ImageMagick, which chooses a coder by sniffing the bytes. The plugin never restricts ImageMagick, so the effective policy is whatever policy.xml the host has. If none is found, ImageMagick's built-in default allows everything.
Today has_signature_for() only lets through bodies that start with a JPEG, PNG or WebP signature, so this is a defense-in-depth gap rather than a known hole. But nothing inside ImageMagick enforces that restriction. If any path ever reached it, ImageMagick would still parse SVG, MSL, PostScript (via Ghostscript), TIFF, MNG and others. MNG and JNG are part of the same module as PNG.
Related issues:
- Animated WebP: ImageMagick decodes every frame before Magick++ keeps the first, so the work grows with the frame count up to the resource limits.
- Host limits: a host
policy.xmlcan lower the plugin's decode limits. When it does, conversions quietly turn into pass-throughs and nothing is logged. - The
websafepolicy doesn't fit. ImageMagick's own websafe policy isn't a drop-in fix:- With the plugin's
disk(0), its 8000-pixel area limit fails nearly every image. - Its
dynamic-throttlesetting sleeps on event threads. - It still allows GIF, BMP, TIFF, MNG and JNG.
- It's a build-time option only from ImageMagick 7.1.1-16.
- With the plugin's
Proposal
At init, install a policy specific to the plugin with SetMagickSecurityPolicy(), which is available since IM6 6.9.10 and IM7 7.0.10:
- Allow only the coders and modules the plugin uses: read JPEG, PNG and WebP; write JPEG and WebP.
- Deny delegates (external programs), filters and file paths.
- Limit decodes to single-frame images.
- Never re-allow anything the host policy denies. If the host denies a format the plugin needs, log an error and disable the plugin.
- Check the result after installing the policy, and disable the plugin if it didn't take effect.
- At startup, warn about host settings that quietly prevent conversions: lowered limits, a time limit, dynamic throttling, or a small
max-memory-request.
The policy applies to the whole process, so it would also restrict other ImageMagick users in the same traffic_server, such as the experimental magick plugin. That should be documented.
- Lingua principale
- C++
- Stelle
- 2k
- Fork
- 878
- Merge medio
- 3g 15h
- PR unite (30g)
- 94
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/trafficserver
-
Bug HTTP Support
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
apache/trafficserver#13118 ·
I maintainer di solito rispondono entro 2 giorni
-
traffic_ctl: apply --error-level to config reload resultsForse già presa @brbzull0 l’ha presa 1 giorno fa. Aperta
apache/trafficserver#13832 · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
header_rewrite: rm-destination after set-destination URL crashes traffic_serverForse già presa @moonchen l’ha presa 8 giorni fa. ApertaBug Crash header_rewrite Plugins
apache/trafficserver#13800 · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
apache/trafficserver#13798 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
apache/trafficserver#13784 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di apache/trafficserver
Issue simili
-
llvm.memcpy with destination align but no source align asserts "Missed Source alignment!"Forse già presa @pvelesko l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
KhronosGroup/SPIRV-LLVM-Translator#4093 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
SIMQ silently truncates multi-query batch search to the first queryForse già presa @LHT129 l’ha presa oggi. Apertakind/bug module/index needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
antgroup/vsag#3080 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 Mezza giornata Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
KhronosGroup/glslang#4469 ·
I maintainer di solito rispondono entro 1 giorno