Package: release.debian.org
Severity: normal
Tags: bookworm
X-Debbugs-Cc: kuberne...@packages.debian.org
Control: affects -1 + src:kubernetes
User: release.debian....@packages.debian.org
Usertags: pu

[ Reason ]
Fix for CVE-2021-25743: kubectl (kubernetes-client) does not neutralize escape,
meta or control sequences contained in the raw data it outputs to a terminal.

This includes but is not limited to the unstructured string fields in objects
such as Events.

This vulnerability allows potential terminal escape sequence attacks that could
execute unintended terminal behavior when malicious input is rendered.

- Security Tracker: https://security-tracker.debian.org/tracker/CVE-2021-25743

[ Impact ]
Without this update, users remain vulnerable to terminal escape sequence
attacks when using kubectl (kubernetes-client).

Malicious input in Kubernetes objects could potentially execute unintended
terminal behavior, posing a security risk.

[ Tests ]
The patch includes comprehensive test coverage:
- Terminal escape character tests in tableprinter_test.go
- Custom column escape tests in customcolumn_test.go  
- Describe command escape tests in describe_test.go

All tests verify proper escaping of terminal special characters.

Additionally, I built and installed the package locally to verify that the
reproducible scenario described in
https://github.com/kubernetes/kubernetes/issues/101695 is fixed.

[ Risks ]
Low risk.
The changes are minimal and well-tested:
- Adds terminal character escaping functionality
- Modifies output formatting to use escape functions
- No breaking changes to functionality.

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

[ Changes ]
1. CVE-2021-25743.patch: Backports upstream fix for terminal escape sequences
   - Adds terminal.go with escaping functions
   - Updates tableprinter.go to escape output
   - Updates customcolumn.go and describe.go to use escaping
   - Includes tests

2. 0001-Hide-long-and-multiline-strings-when-printing.patch:
   - Adds string truncation for long/multiline strings in table output

3. 0002-Restore-ability-to-print-long-strings.patch:
   - Removes arbitrary 100-char limit while keeping newline truncation

[ Other info ]
This is a security update for a CVE affecting kubectl (kubernetes-client)
terminal output.

The patches are backported from upstream Kubernetes with manual adjustments
for version compatibility.

The kubectl events command referenced in the original upstream patch was not
present in 1.20.2, so those files were omitted from the backport.

Reply via email to