Sanitizing sideband output
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest7 patches 1 replyIn review
- v13 patches 0 repliesSuperseded
Patches in v5 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | sideband: mask control characterssideband.c t/ | +27 | 0 replies | |
| 2/7 | sideband: introduce an "escape hatch" to allow control charactersDocumentation/ Documentation/ sideband.c +1 more | +24 | 0 replies | |
| 3/7 | sideband: do allow ANSI color sequences by defaultDocumentation/ sideband.c t/ | +91 | 0 replies | |
| 4/7 | sideband: add options to allow more control sequences to be passed throughDocumentation/ sideband.c t/ | +123 | 0 replies | |
| 5/7 | sideband: offer to configure sanitizing on a per-URL basisDocumentation/ sideband.c sideband.h +2 more | +102 | 0 replies | |
| 6/7 | sideband: drop 'default' configurationDocumentation/ sideband.c | +2 | 0 replies | |
| 7/7 | sideband: delay sanitizing by default to Git v3.0Documentation/ sideband.c t/ | +28 | 1 reply |
Reviews trailers per patch
None of the 7 patches has a Reviewed-by or Acked-by.
| Patch | Phillip Wood |
|---|---|
| 1/7 | Helped-by |
| 2/7 | |
| 3/7 | |
| 4/7 | |
| 5/7 | |
| 6/7 | |
| 7/7 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v5 0/7] Sanitizing sideband output
Git's sideband channel passes server output directly to the client terminal without sanitizing it, creating an ANSI escape sequence injection vulnerability. A patchset was posted based on the "we dictate what byte sequences are allowed to be used by the end user, and reject everything else, but the users can choose to lift the blanket rejection" approach, found in [*1*], but the discussion stalled.
Here is an attempt to unblock the topic. In this round, the series keeps the "we know what users are allowed to use and reject the rest" approach from the original, but fixes one design problem around the configuration variable. The value 'default' that can be explicitly set to the configuration whose meaning is planned to change across Git 3.0 boundary is now gone.
The series is structured as follows.
* The first 5 patches are from Dscho's [v4 1-5/6]. These introduce "reject what we do not explicitly allow" framework, and by default allow only ANSI color escape sequences.
[1/7] sideband: mask control characters
[2/7] sideband: introduce an "escape hatch" to allow control characters [3/7] sideband: do allow ANSI color sequences by default
[4/7] sideband: add options to allow more control sequences to be passed through [5/7] sideband: offer to configure sanitizing on a per-URL basis
* The 'default' problem was raised in [*2*] and the 6th patch is about solving it.
[6/7] sideband: drop 'default' configuration
* The 7th patch is from Dscho's [v4 6/6], adjusted for the above step. This loosens the rules to allow _everything_ (i.e., the same as before) before Git 3.0, and then rejects anything other than ANSI color escape sequences after Git 3.0
[7/7] sideband: delay sanitizing by default to Git v3.0
I think without the 'default' that changes its meaning across version boundary, the early part of the series is a good place to stop, if we want to proceed with the "allowlist" approach. Unless I hear objections, let's plan to merge patches 1-6 (i.e., everything other than ANSI color escape sequences are filtered out) to 'next' and keep it there for some time, to see if anybody screams, without the last patch.
I am still hoping that people can help the topic and make it less risky for users who are affected by switching to an opposite philosophy, namely, "we filter byte sequences that are known to us to be problematic, and pass everything else intact", but that is a separate topic [*2*]. The experiment with patches 1-6 cooked in 'next' long enough may convince ourselves that ANSI colors are the only thing that needs passing (which I personally fear is a bit too naïve but we will never know until we try).
[References]
*1* https://lore.kernel.org/git/[email protected]/
*2* https://lore.kernel.org/git/[email protected]/
Signature · 1 line
2.53.0-629-gb58d2f6a3e