Artifactspublic-v0

curl

master
ply4 git calls27 ms289 KiB3 cachedprotocol v2
156 lines5.1 KiBRaw

Anatomy of a curl security advisory

As described in the vulnerability disclosure policy, when a vulnerability has been reported to the project and it has been confirmed by the team, we author an advisory document for the issue.

<p> This advisory document should ideally be written in cooperation with the reporter to make sure all the angles and details of the problem are gathered and described correctly and succinctly.

New document

A security advisory for curl is created in the docs/ folder in the curl-www repository. It should be named $CVEID.md where $CVEID is the full CVE Id that has been registered for the flaw. Like CVE-2016-0755. The .md extension of course means that the document is written using markdown.

The standard way to go about this is to first write the VULNERABILITY section for the document, so that there is description of the flaw available, then paste this description into the CVE Id request.

vuln.pm

The new issue should be entered at the top of the list in the file vuln.pm in the same directory. It holds a large array with all published curl vulnerabilities. All fields should be filled in accordingly, separated by a pipe character (|).

The fields for every CVE in vuln.pm are, in order:

  1. HTML page name
  2. first vulnerable version
  3. last vulnerable version
  4. name of the issue
  5. CVE Id
  6. announce date (YYYYMMDD)
  7. report to the project date (YYYYMMDD)
  8. CWE
  9. awarded reward amount (USD)
  10. area (single word)
  11. C-issue (- if not a C issue at all, OVERFLOW , OVERREAD, DOUBLE_FREE, USE_AFTER_FREE, NULL_MISTAKE, UNINIT, BAD_FREE)
  12. affected components: both, lib or tool
  13. severity: low, medium, high or critical
  14. URL to the initial report (often on HackerOne)

A line to use can be generated with ./md2vuln.pl [markdown file name].

Makefile

The new CVE webpage filename needs to be added in the Makefile's CVELIST macro.

When the markdown is in place and the Makefile and vuln.pm are updated, all other files and metadata for all curl advisories and versions get generated automatically using those files.

Document format

The easy way is to start with a recent previously published advisory and blank out old texts and save it using a new name. Save the subtitles and general layout.

Some details and metadata are extracted from this document so it is important to stick to the existing format.

The first list must be the title of the issue.

VULNERABILITY

The first subtitle should be VULNERABILITY. That should then include a through and detailed description of the flaw. Including how it can be triggered and maybe something about what might happen if triggered or exploited.

INFO

The next section is INFO which adds meta data information about the flaw. It specifically mentions the official CVE Id for the issue and it must list the CWE Id, starting on its own line. We write CWE identifiers in advisories with the full (official) explanation on the right side of a colon. Like this:

CWE-305: Authentication Bypass by Primary Weakness

There should also be two lines for area and original report URL:

- Area: [single word]
- Original report: [URL]

AFFECTED VERSIONS

The third section first lists what versions that are affected, then adds clarity by stressing what versions that are not affected. A third line adds information about which specific git commit that introduced the vulnerability.

The Introduced-in commit should be a full URL that displays the commit, but should work as a stand-alone commit hash if everything up to the last slash is cut out.

An example using the correct syntax:

- Affected versions: curl 7.16.1 to and including 7.88.1
- Not affected versions: curl < 7.16.1 and curl >= 8.0.0
- Introduced-in: https://github.com/curl/curl/commit/2147284cad

THE SOLUTION

This section describes and discusses the fix. The only mandatory information here is the link to the git commit that fixes the problem.

The Fixed-in value should be a full URL that displays the commit, but should work as a stand-alone commit hash if everything up to the last slash is cut out.

Example:

- Fixed-in: https://github.com/curl/curl/commit/af369db4d3833272b8ed

RECOMMENDATIONS

This section lists the recommended actions for the users in a top to bottom priority order and should ideally contain three items but no less than two.

The top two are almost always upgrade curl to version XXX and apply the patch to your local version.

TIMELINE

Detail when this report was received in the project. When package distributors were notified (via the distros mailing list or similar)

When the advisory and fixed version are released.

CREDITS

Mention the reporter and patch author at least, then everyone else involved you think deserves a mention.

If you want to mention more than one name, separate the names with comma (,).

- Reported-by: Full Name
- Patched-by: Full Name
1<!--
2Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
4SPDX-License-Identifier: curl
5-->
7# Anatomy of a curl security advisory
9As described in the [vulnerability disclosure
10policy](https://curl.se/dev/vuln-disclosure.html), when a vulnerability has
11been reported to the project and it has been confirmed by the team, we
12author an advisory document for the issue.
14<p> This advisory document should ideally be written in cooperation with the
15reporter to make sure all the angles and details of the problem are gathered
16and described correctly and succinctly.
18## New document
20A security advisory for curl is created in the `docs/` folder in the
21[curl-www](https://github.com/curl/curl-www) repository. It should be named
22`$CVEID.md` where `$CVEID` is the full CVE Id that has been registered for the
23flaw. Like `CVE-2016-0755`. The `.md` extension of course means that the
24document is written using markdown.
26The standard way to go about this is to first write the `VULNERABILITY`
27section for the document, so that there is description of the flaw available,
28then paste this description into the CVE Id request.
30### `vuln.pm`
32The new issue should be entered at the top of the list in the file `vuln.pm`
33in the same directory. It holds a large array with all published curl
34vulnerabilities. All fields should be filled in accordingly, separated by a
35pipe character (`|`).
37The fields for every CVE in `vuln.pm` are, in order:
391. HTML page name
402. first vulnerable version
413. last vulnerable version
424. name of the issue
435. CVE Id
446. announce date (`YYYYMMDD`)
457. report to the project date (`YYYYMMDD`)
468. CWE
479. awarded reward amount (USD)
4810. area (single word)
4911. C-issue (`-` if not a C issue at all, `OVERFLOW` , `OVERREAD`, `DOUBLE_FREE`, `USE_AFTER_FREE`, `NULL_MISTAKE`, `UNINIT`, `BAD_FREE`)
5012. affected components: `both`, `lib` or `tool`
5113. severity: `low`, `medium`, `high` or `critical`
5214. URL to the initial report (often on HackerOne)
54A line to use can be generated with `./md2vuln.pl [markdown file name]`.
56### `Makefile`
58The new CVE webpage filename needs to be added in the `Makefile`'s `CVELIST`
59macro.
61When the markdown is in place and the `Makefile` and `vuln.pm` are updated,
62all other files and metadata for all curl advisories and versions get
63generated automatically using those files.
65## Document format
67The easy way is to start with a recent previously published advisory and blank
68out old texts and save it using a new name. Save the subtitles and general
69layout.
71Some details and metadata are extracted from this document so it is important
72to stick to the existing format.
74The first list must be the title of the issue.
76### VULNERABILITY
78The first subtitle should be `VULNERABILITY`. That should then include a
79through and detailed description of the flaw. Including how it can be
80triggered and maybe something about what might happen if triggered or
81exploited.
83### INFO
85The next section is `INFO` which adds meta data information about the flaw. It
86specifically mentions the official CVE Id for the issue and it must list the
87CWE Id, starting on its own line. We write CWE identifiers in advisories with
88the full (official) explanation on the right side of a colon. Like this:
90`CWE-305: Authentication Bypass by Primary Weakness`
92There should also be two lines for area and original report URL:
94~~~
95- Area: [single word]
96- Original report: [URL]
97~~~
99### AFFECTED VERSIONS
101The third section first lists what versions that are affected, then adds
102clarity by stressing what versions that are *not* affected. A third line adds
103information about which specific git commit that introduced the vulnerability.
105The `Introduced-in` commit should be a full URL that displays the commit, but
106should work as a stand-alone commit hash if everything up to the last slash is
107cut out.
109An example using the correct syntax:
111~~~
112- Affected versions: curl 7.16.1 to and including 7.88.1
113- Not affected versions: curl < 7.16.1 and curl >= 8.0.0
114- Introduced-in: https://github.com/curl/curl/commit/2147284cad
115~~~
117### THE SOLUTION
119This section describes and discusses the fix. The only mandatory information
120here is the link to the git commit that fixes the problem.
122The `Fixed-in` value should be a full URL that displays the commit, but should
123work as a stand-alone commit hash if everything up to the last slash is cut
124out.
126Example:
128`- Fixed-in: https://github.com/curl/curl/commit/af369db4d3833272b8ed`
130### RECOMMENDATIONS
132This section lists the recommended actions for the users in a top to bottom
133priority order and should ideally contain three items but no less than two.
135The top two are almost always `upgrade curl to version XXX` and `apply the
136patch to your local version`.
138### TIMELINE
140Detail when this report was received in the project. When package distributors
141were notified (via the distros mailing list or similar)
143When the advisory and fixed version are released.
145### CREDITS
147Mention the reporter and patch author at least, then everyone else involved
148you think deserves a mention.
150If you want to mention more than one name, separate the names with comma
151(`,`).
153~~~
154- Reported-by: Full Name
155- Patched-by: Full Name
156~~~
Diagnostics4 git calls · 27 ms
CallStatusSizeTime027 ms
discover200152 B4 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=2
git.response.bytes=152
git.server.agent=gitty/1.0
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch object-format
git.server.fetch=shallow filter sideband-all
git.protocol.version=2
git.pkt.frames=8
git.pkt.data=6
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=152
git.pkt.payload.max=34
ls-refs200149 B · hit3 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=3
git.response.bytes=149
git.response.cache=HIT
git.response.duration_ms=3
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=149
git.pkt.payload.max=78
git.ls_refs.count=2
git.ls_refs.head=refs/heads/master
fetchblob:none · deepen 10200287 KiB · hit3 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=20
git.response.bytes=293470
git.response.cache=HIT
git.response.duration_ms=3
git.fetch.filter=blob:none
git.fetch.filter.requested=tree:0
git.fetch.filter.fallback=blob:none
git.fetch.filter.learned=false
git.fetch.wants=31c911efe5652725e930f4d2e60c9060e5f6646d
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=10
git.pkt.data=8
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=293470
git.pkt.payload.max=65516
git.sideband.band1.bytes=293354
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=87
git.pack.bytes=293354
git.pack.ofs_delta=0
git.pack.ref_delta=1
git.pack.chain.max=1
git.pack.trailer=6a646bcda6740bab42e321b51998b52ea15146c0
git.pack.full=86
Open pack map
fetch2002.5 KiB · hit20 ms
git.upload-pack fetch
http.response.status_code=200
git.response.bytes=2587
git.response.cache=HIT
git.response.duration_ms=20
git.fetch.wants=fbfafa353ebc9f79a0b99dcd17e35a5e19b2de16
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=2587
git.pkt.payload.max=2566
git.sideband.band1.bytes=2565
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/curl.git
Ref
refs/heads/master
Commit
31c911efe5652725e930f4d2e60c9060e5f6646d
cf-ray
a5e2b1481e88e6b0
Request
dd5b4e6c…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format