NBD: don't print raw server error text to terminal
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 15 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | util: Refactor json-writer's string sanitizer to be publicinclude/ qobject/ util/ | +88 | 6 replies | |
| 2/2 | qemu-img: CVE-XXX Sanitize untrusted output from NBD servernbd/ | +4 | 6 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Richard W.M. Jones | Philippe Mathieu-Daudé | Daniel P. Berrangé |
|---|---|---|---|
| 1/2 | R-b | R-b | R-b |
| 2/2 | R-b | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH for-9.1 0/2] NBD: don't print raw server error text to terminal
I've requested a CVE from Red Hat, and hope to have an assigned number soon. Meanwhile, we can get review started, to make sure this is ready to include in 9.1. 'qemu-img info' should never print untrusted data in a way that might take over a user's terminal.
There are probably other spots where qemu-img info is printing untrusted data (such as filenames), where we probably ought to use the same sanitization tactics as shown here. Identifying those spots would be a useful part of this review, and may mean a v2 that is even more extensive in the number of patches.
In patch 1, I created mod_utf8_sanitize_len(), with the intent that I could sanitize just a prefix of a string without having to copy it into a NUL-terminated buffer. I didn't end up needing it in my current version of patch 2 (since the code was already copying to a NUL-terminated buffer for trace purposes), but we may find uses for it; in fact, it raises the question of whether any of our trace_ calls need to sanitize untrusted data (or whether we can rely on ALL trace engines to be doing that on our behalf, already).
Eric Blake (2):
util: Refactor json-writer's string sanitizer to be public
qemu-img: CVE-XXX Sanitize untrusted output from NBD server
include/qemu/unicode.h | 3 ++ nbd/client.c | 5 ++- qobject/json-writer.c | 47 +---------------------- util/unicode.c | 84 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 92 insertions(+), 47 deletions(-)
Signature · 1 line
2.45.2