xref: /aosp_15_r20/external/curl/docs/VULN-DISCLOSURE-POLICY.md (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker<!--
2*6236dae4SAndroid Build Coastguard WorkerCopyright (C) Daniel Stenberg, <[email protected]>, et al.
3*6236dae4SAndroid Build Coastguard Worker
4*6236dae4SAndroid Build Coastguard WorkerSPDX-License-Identifier: curl
5*6236dae4SAndroid Build Coastguard Worker-->
6*6236dae4SAndroid Build Coastguard Worker
7*6236dae4SAndroid Build Coastguard Worker# curl vulnerability disclosure policy
8*6236dae4SAndroid Build Coastguard Worker
9*6236dae4SAndroid Build Coastguard WorkerThis document describes how security vulnerabilities are handled in the curl
10*6236dae4SAndroid Build Coastguard Workerproject.
11*6236dae4SAndroid Build Coastguard Worker
12*6236dae4SAndroid Build Coastguard Worker## Publishing Information
13*6236dae4SAndroid Build Coastguard Worker
14*6236dae4SAndroid Build Coastguard WorkerAll known and public curl or libcurl related vulnerabilities are listed on
15*6236dae4SAndroid Build Coastguard Worker[the curl website security page](https://curl.se/docs/security.html).
16*6236dae4SAndroid Build Coastguard Worker
17*6236dae4SAndroid Build Coastguard WorkerSecurity vulnerabilities **should not** be entered in the project's public bug
18*6236dae4SAndroid Build Coastguard Workertracker.
19*6236dae4SAndroid Build Coastguard Worker
20*6236dae4SAndroid Build Coastguard Worker## Vulnerability Handling
21*6236dae4SAndroid Build Coastguard Worker
22*6236dae4SAndroid Build Coastguard WorkerThe typical process for handling a new security vulnerability is as follows.
23*6236dae4SAndroid Build Coastguard Worker
24*6236dae4SAndroid Build Coastguard WorkerNo information should be made public about a vulnerability until it is
25*6236dae4SAndroid Build Coastguard Workerformally announced at the end of this process. That means, for example, that a
26*6236dae4SAndroid Build Coastguard Workerbug tracker entry must NOT be created to track the issue since that makes the
27*6236dae4SAndroid Build Coastguard Workerissue public and it should not be discussed on any of the project's public
28*6236dae4SAndroid Build Coastguard Workermailing lists. Messages associated with any commits should not make any
29*6236dae4SAndroid Build Coastguard Workerreference to the security nature of the commit if done prior to the public
30*6236dae4SAndroid Build Coastguard Workerannouncement.
31*6236dae4SAndroid Build Coastguard Worker
32*6236dae4SAndroid Build Coastguard Worker- The person discovering the issue, the reporter, reports the vulnerability on
33*6236dae4SAndroid Build Coastguard Worker  [HackerOne](https://hackerone.com/curl). Issues filed there reach a handful
34*6236dae4SAndroid Build Coastguard Worker  of selected and trusted people.
35*6236dae4SAndroid Build Coastguard Worker
36*6236dae4SAndroid Build Coastguard Worker- Messages that do not relate to the reporting or managing of an undisclosed
37*6236dae4SAndroid Build Coastguard Worker  security vulnerability in curl or libcurl are ignored and no further action
38*6236dae4SAndroid Build Coastguard Worker  is required.
39*6236dae4SAndroid Build Coastguard Worker
40*6236dae4SAndroid Build Coastguard Worker- A person in the security team responds to the original report to acknowledge
41*6236dae4SAndroid Build Coastguard Worker  that a human has seen the report.
42*6236dae4SAndroid Build Coastguard Worker
43*6236dae4SAndroid Build Coastguard Worker- The security team investigates the report and either rejects it or accepts
44*6236dae4SAndroid Build Coastguard Worker  it. See below for examples of problems that are not considered
45*6236dae4SAndroid Build Coastguard Worker  vulnerabilities.
46*6236dae4SAndroid Build Coastguard Worker
47*6236dae4SAndroid Build Coastguard Worker- If the report is rejected, the team writes to the reporter to explain why.
48*6236dae4SAndroid Build Coastguard Worker
49*6236dae4SAndroid Build Coastguard Worker- If the report is accepted, the team writes to the reporter to let them
50*6236dae4SAndroid Build Coastguard Worker  know it is accepted and that they are working on a fix.
51*6236dae4SAndroid Build Coastguard Worker
52*6236dae4SAndroid Build Coastguard Worker- The security team discusses the problem, works out a fix, considers the
53*6236dae4SAndroid Build Coastguard Worker  impact of the problem and suggests a release schedule. This discussion
54*6236dae4SAndroid Build Coastguard Worker  should involve the reporter as much as possible.
55*6236dae4SAndroid Build Coastguard Worker
56*6236dae4SAndroid Build Coastguard Worker- The release of the information should be "as soon as possible" and is most
57*6236dae4SAndroid Build Coastguard Worker  often synchronized with an upcoming release that contains the fix. If the
58*6236dae4SAndroid Build Coastguard Worker  reporter, or anyone else involved, thinks the next planned release is too
59*6236dae4SAndroid Build Coastguard Worker  far away, then a separate earlier release should be considered.
60*6236dae4SAndroid Build Coastguard Worker
61*6236dae4SAndroid Build Coastguard Worker- Write a security advisory draft about the problem that explains what the
62*6236dae4SAndroid Build Coastguard Worker  problem is, its impact, which versions it affects, solutions or workarounds,
63*6236dae4SAndroid Build Coastguard Worker  when the release is out and make sure to credit all contributors properly.
64*6236dae4SAndroid Build Coastguard Worker  Figure out the CWE (Common Weakness Enumeration) number for the flaw. See
65*6236dae4SAndroid Build Coastguard Worker  [SECURITY-ADVISORY](https://curl.se/dev/advisory.html) for help on creating
66*6236dae4SAndroid Build Coastguard Worker  the advisory.
67*6236dae4SAndroid Build Coastguard Worker
68*6236dae4SAndroid Build Coastguard Worker- Request a CVE Id for the issue. curl is a CNA (CVE Numbering Authority) and
69*6236dae4SAndroid Build Coastguard Worker  can request its own numbers.
70*6236dae4SAndroid Build Coastguard Worker
71*6236dae4SAndroid Build Coastguard Worker- Update the "security advisory" with the CVE number.
72*6236dae4SAndroid Build Coastguard Worker
73*6236dae4SAndroid Build Coastguard Worker- The security team commits the fix in a private branch. The commit message
74*6236dae4SAndroid Build Coastguard Worker  should ideally contain the CVE number. If the severity level of the issue is
75*6236dae4SAndroid Build Coastguard Worker  set to Low or Medium, the fix is allowed to get merged into the master
76*6236dae4SAndroid Build Coastguard Worker  repository via a normal PR - but without mentioning it being a security
77*6236dae4SAndroid Build Coastguard Worker  vulnerability.
78*6236dae4SAndroid Build Coastguard Worker
79*6236dae4SAndroid Build Coastguard Worker- The monetary reward part of the bug-bounty is managed by the Internet Bug
80*6236dae4SAndroid Build Coastguard Worker  Bounty team and the reporter is asked to request the reward from them after
81*6236dae4SAndroid Build Coastguard Worker  the issue has been completely handled and published by curl.
82*6236dae4SAndroid Build Coastguard Worker
83*6236dae4SAndroid Build Coastguard Worker- No more than 10 days before release, inform
84*6236dae4SAndroid Build Coastguard Worker  [distros@openwall](https://oss-security.openwall.org/wiki/mailing-lists/distros)
85*6236dae4SAndroid Build Coastguard Worker  to prepare them about the upcoming public security vulnerability
86*6236dae4SAndroid Build Coastguard Worker  announcement - attach the advisory draft for information with CVE and
87*6236dae4SAndroid Build Coastguard Worker  current patch. 'distros' does not accept an embargo longer than 14 days and
88*6236dae4SAndroid Build Coastguard Worker  they do not care for Windows-specific flaws.
89*6236dae4SAndroid Build Coastguard Worker
90*6236dae4SAndroid Build Coastguard Worker- No more than 48 hours before the release, the private branch is merged into
91*6236dae4SAndroid Build Coastguard Worker  the master branch and pushed. Once pushed, the information is accessible to
92*6236dae4SAndroid Build Coastguard Worker  the public and the actual release should follow suit immediately afterwards.
93*6236dae4SAndroid Build Coastguard Worker  The time between the push and the release is used for final tests and
94*6236dae4SAndroid Build Coastguard Worker  reviews.
95*6236dae4SAndroid Build Coastguard Worker
96*6236dae4SAndroid Build Coastguard Worker- The project team creates a release that includes the fix.
97*6236dae4SAndroid Build Coastguard Worker
98*6236dae4SAndroid Build Coastguard Worker- The project team announces the release and the vulnerability to the world in
99*6236dae4SAndroid Build Coastguard Worker  the same manner we always announce releases. It gets sent to the
100*6236dae4SAndroid Build Coastguard Worker  curl-announce, curl-library and curl-users mailing lists.
101*6236dae4SAndroid Build Coastguard Worker
102*6236dae4SAndroid Build Coastguard Worker- The security webpage on the website should get the new vulnerability
103*6236dae4SAndroid Build Coastguard Worker  mentioned.
104*6236dae4SAndroid Build Coastguard Worker
105*6236dae4SAndroid Build Coastguard Worker## security (at curl dot se)
106*6236dae4SAndroid Build Coastguard Worker
107*6236dae4SAndroid Build Coastguard WorkerThis is a private mailing list for discussions on and about curl security
108*6236dae4SAndroid Build Coastguard Workerissues.
109*6236dae4SAndroid Build Coastguard Worker
110*6236dae4SAndroid Build Coastguard WorkerWho is on this list? There are a couple of criteria you must meet, and then we
111*6236dae4SAndroid Build Coastguard Workermight ask you to join the list or you can ask to join it. It really is not a
112*6236dae4SAndroid Build Coastguard Workerformal process. We basically only require that you have a long-term presence
113*6236dae4SAndroid Build Coastguard Workerin the curl project and you have shown an understanding for the project and
114*6236dae4SAndroid Build Coastguard Workerits way of working. You must have been around for a good while and you should
115*6236dae4SAndroid Build Coastguard Workerhave no plans of vanishing in the near future.
116*6236dae4SAndroid Build Coastguard Worker
117*6236dae4SAndroid Build Coastguard WorkerWe do not make the list of participants public mostly because it tends to vary
118*6236dae4SAndroid Build Coastguard Workersomewhat over time and a list somewhere only risks getting outdated.
119*6236dae4SAndroid Build Coastguard Worker
120*6236dae4SAndroid Build Coastguard Worker## Publishing Security Advisories
121*6236dae4SAndroid Build Coastguard Worker
122*6236dae4SAndroid Build Coastguard Worker1. Write up the security advisory, using markdown syntax. Use the same
123*6236dae4SAndroid Build Coastguard Worker   subtitles as last time to maintain consistency.
124*6236dae4SAndroid Build Coastguard Worker
125*6236dae4SAndroid Build Coastguard Worker2. Name the advisory file after the allocated CVE id.
126*6236dae4SAndroid Build Coastguard Worker
127*6236dae4SAndroid Build Coastguard Worker3. Add a line on the top of the array in `curl-www/docs/vuln.pm`.
128*6236dae4SAndroid Build Coastguard Worker
129*6236dae4SAndroid Build Coastguard Worker4. Put the new advisory markdown file in the `curl-www/docs/` directory. Add it
130*6236dae4SAndroid Build Coastguard Worker   to the git repository.
131*6236dae4SAndroid Build Coastguard Worker
132*6236dae4SAndroid Build Coastguard Worker5. Run `make` in your local web checkout and verify that things look fine.
133*6236dae4SAndroid Build Coastguard Worker
134*6236dae4SAndroid Build Coastguard Worker6. On security advisory release day, push the changes on the curl-www
135*6236dae4SAndroid Build Coastguard Worker   repository's remote master branch.
136*6236dae4SAndroid Build Coastguard Worker
137*6236dae4SAndroid Build Coastguard Worker## HackerOne
138*6236dae4SAndroid Build Coastguard Worker
139*6236dae4SAndroid Build Coastguard WorkerRequest the issue to be disclosed. If there are sensitive details present in
140*6236dae4SAndroid Build Coastguard Workerthe report and discussion, those should be redacted from the disclosure. The
141*6236dae4SAndroid Build Coastguard Workerdefault policy is to disclose as much as possible as soon as the vulnerability
142*6236dae4SAndroid Build Coastguard Workerhas been published.
143*6236dae4SAndroid Build Coastguard Worker
144*6236dae4SAndroid Build Coastguard Worker## Bug Bounty
145*6236dae4SAndroid Build Coastguard Worker
146*6236dae4SAndroid Build Coastguard WorkerSee [BUG-BOUNTY](https://curl.se/docs/bugbounty.html) for details on the
147*6236dae4SAndroid Build Coastguard Workerbug bounty program.
148*6236dae4SAndroid Build Coastguard Worker
149*6236dae4SAndroid Build Coastguard Worker# Severity levels
150*6236dae4SAndroid Build Coastguard Worker
151*6236dae4SAndroid Build Coastguard WorkerThe curl project's security team rates security problems using four severity
152*6236dae4SAndroid Build Coastguard Workerlevels depending how serious we consider the problem to be. We use **Low**,
153*6236dae4SAndroid Build Coastguard Worker**Medium**, **High** and **Critical**. We refrain from using numerical scoring
154*6236dae4SAndroid Build Coastguard Workerof vulnerabilities.
155*6236dae4SAndroid Build Coastguard Worker
156*6236dae4SAndroid Build Coastguard WorkerWhen deciding severity level on a particular issue, we take all the factors
157*6236dae4SAndroid Build Coastguard Workerinto account: attack vector, attack complexity, required privileges, necessary
158*6236dae4SAndroid Build Coastguard Workerbuild configuration, protocols involved, platform specifics and also what
159*6236dae4SAndroid Build Coastguard Workereffects a possible exploit or trigger of the issue can lead do, including
160*6236dae4SAndroid Build Coastguard Workerconfidentiality, integrity or availability problems.
161*6236dae4SAndroid Build Coastguard Worker
162*6236dae4SAndroid Build Coastguard Worker## Low
163*6236dae4SAndroid Build Coastguard Worker
164*6236dae4SAndroid Build Coastguard WorkerThis is a security problem that is truly hard or unlikely to exploit or
165*6236dae4SAndroid Build Coastguard Workertrigger. Due to timing, platform requirements or the fact that options or
166*6236dae4SAndroid Build Coastguard Workerprotocols involved are rare etc. [Past
167*6236dae4SAndroid Build Coastguard Workerexample](https://curl.se/docs/CVE-2022-43552.html)
168*6236dae4SAndroid Build Coastguard Worker
169*6236dae4SAndroid Build Coastguard Worker## Medium
170*6236dae4SAndroid Build Coastguard Worker
171*6236dae4SAndroid Build Coastguard WorkerThis is a security problem that is less hard than **Low** to exploit or
172*6236dae4SAndroid Build Coastguard Workertrigger. Less strict timing, wider platforms availability or involving more
173*6236dae4SAndroid Build Coastguard Workerwidely used options or protocols. A problem that usually needs something else
174*6236dae4SAndroid Build Coastguard Workerto also happen to become serious. [Past
175*6236dae4SAndroid Build Coastguard Workerexample](https://curl.se/docs/CVE-2022-32206.html)
176*6236dae4SAndroid Build Coastguard Worker
177*6236dae4SAndroid Build Coastguard Worker## High
178*6236dae4SAndroid Build Coastguard Worker
179*6236dae4SAndroid Build Coastguard WorkerThis issue in itself a serious problem with real world impact. Flaws that can
180*6236dae4SAndroid Build Coastguard Workereasily compromise the confidentiality, integrity or availability of resources.
181*6236dae4SAndroid Build Coastguard WorkerExploiting or triggering this problem is not hard. [Past
182*6236dae4SAndroid Build Coastguard Workerexample](https://curl.se/docs/CVE-2019-3822.html)
183*6236dae4SAndroid Build Coastguard Worker
184*6236dae4SAndroid Build Coastguard Worker## Critical
185*6236dae4SAndroid Build Coastguard Worker
186*6236dae4SAndroid Build Coastguard WorkerEasily exploitable by a remote unauthenticated attacker and lead to system
187*6236dae4SAndroid Build Coastguard Workercompromise (arbitrary code execution) without requiring user interaction, with
188*6236dae4SAndroid Build Coastguard Workera common configuration on a popular platform. This issue has few restrictions
189*6236dae4SAndroid Build Coastguard Workerand requirements and can be exploited easily using most curl configurations.
190*6236dae4SAndroid Build Coastguard Worker[Past example](https://curl.se/docs/CVE-2000-0973.html)
191*6236dae4SAndroid Build Coastguard Worker
192*6236dae4SAndroid Build Coastguard Worker# Not security issues
193*6236dae4SAndroid Build Coastguard Worker
194*6236dae4SAndroid Build Coastguard WorkerThis is an incomplete list of issues that are not considered vulnerabilities.
195*6236dae4SAndroid Build Coastguard Worker
196*6236dae4SAndroid Build Coastguard Worker## Small memory leaks
197*6236dae4SAndroid Build Coastguard Worker
198*6236dae4SAndroid Build Coastguard WorkerWe do not consider a small memory leak a security problem; even if the amount
199*6236dae4SAndroid Build Coastguard Workerof allocated memory grows by a small amount every now and then. Long-living
200*6236dae4SAndroid Build Coastguard Workerapplications and services already need to have counter-measures and deal with
201*6236dae4SAndroid Build Coastguard Workergrowing memory usage, be it leaks or just increased use. A small memory or
202*6236dae4SAndroid Build Coastguard Workerresource leak is then expected to *not* cause a security problem.
203*6236dae4SAndroid Build Coastguard Worker
204*6236dae4SAndroid Build Coastguard WorkerOf course there can be a discussion if a leak is small or not. A large leak
205*6236dae4SAndroid Build Coastguard Workercan be considered a security problem due to the DOS risk. If leaked memory
206*6236dae4SAndroid Build Coastguard Workercontains sensitive data it might also qualify as a security problem.
207*6236dae4SAndroid Build Coastguard Worker
208*6236dae4SAndroid Build Coastguard Worker## Never-ending transfers
209*6236dae4SAndroid Build Coastguard Worker
210*6236dae4SAndroid Build Coastguard WorkerWe do not consider flaws that cause a transfer to never end to be a security
211*6236dae4SAndroid Build Coastguard Workerproblem. There are already several benign and likely reasons for transfers to
212*6236dae4SAndroid Build Coastguard Workerstall and never end, so applications that cannot deal with never-ending
213*6236dae4SAndroid Build Coastguard Workertransfers already need to have counter-measures established.
214*6236dae4SAndroid Build Coastguard Worker
215*6236dae4SAndroid Build Coastguard WorkerIf the problem avoids the regular counter-measures when it causes a never-
216*6236dae4SAndroid Build Coastguard Workerending transfer, it might be a security problem.
217*6236dae4SAndroid Build Coastguard Worker
218*6236dae4SAndroid Build Coastguard Worker## Not practically possible
219*6236dae4SAndroid Build Coastguard Worker
220*6236dae4SAndroid Build Coastguard WorkerIf the flaw or vulnerability cannot practically get executed on existing
221*6236dae4SAndroid Build Coastguard Workerhardware it is not a security problem.
222*6236dae4SAndroid Build Coastguard Worker
223*6236dae4SAndroid Build Coastguard Worker## API misuse
224*6236dae4SAndroid Build Coastguard Worker
225*6236dae4SAndroid Build Coastguard WorkerIf a reported issue only triggers by an application using the API in a way
226*6236dae4SAndroid Build Coastguard Workerthat is not documented to work or even documented to not work, it is probably
227*6236dae4SAndroid Build Coastguard Workernot going to be considered a security problem. We only guarantee secure and
228*6236dae4SAndroid Build Coastguard Workerproper functionality when the APIs are used as expected and documented.
229*6236dae4SAndroid Build Coastguard Worker
230*6236dae4SAndroid Build Coastguard WorkerThere can be a discussion about what the documentation actually means and how
231*6236dae4SAndroid Build Coastguard Workerto interpret the text, which might end up with us still agreeing that it is a
232*6236dae4SAndroid Build Coastguard Workersecurity problem.
233*6236dae4SAndroid Build Coastguard Worker
234*6236dae4SAndroid Build Coastguard Worker## Local attackers already present
235*6236dae4SAndroid Build Coastguard Worker
236*6236dae4SAndroid Build Coastguard WorkerWhen an issue can only be attacked or misused by an attacker present on the
237*6236dae4SAndroid Build Coastguard Workerlocal system or network, the bar is raised. If a local user wrongfully has
238*6236dae4SAndroid Build Coastguard Workerelevated rights on your system enough to attack curl, they can probably
239*6236dae4SAndroid Build Coastguard Workeralready do much worse harm and the problem is not really in curl.
240*6236dae4SAndroid Build Coastguard Worker
241*6236dae4SAndroid Build Coastguard Worker## Experiments
242*6236dae4SAndroid Build Coastguard Worker
243*6236dae4SAndroid Build Coastguard WorkerVulnerabilities in features which are off by default (in the build) and
244*6236dae4SAndroid Build Coastguard Workerdocumented as experimental, are not eligible for a reward and we do not
245*6236dae4SAndroid Build Coastguard Workerconsider them security problems.
246*6236dae4SAndroid Build Coastguard Worker
247*6236dae4SAndroid Build Coastguard Worker## URL inconsistencies
248*6236dae4SAndroid Build Coastguard Worker
249*6236dae4SAndroid Build Coastguard WorkerURL parser inconsistencies between browsers and curl are expected and are not
250*6236dae4SAndroid Build Coastguard Workerconsidered security vulnerabilities. The WHATWG URL Specification and RFC
251*6236dae4SAndroid Build Coastguard Worker3986+ (the plus meaning that it is an extended version) [are not completely
252*6236dae4SAndroid Build Coastguard Workerinteroperable](https://github.com/bagder/docs/blob/master/URL-interop.md).
253*6236dae4SAndroid Build Coastguard Worker
254*6236dae4SAndroid Build Coastguard WorkerObvious parser bugs can still be vulnerabilities of course.
255*6236dae4SAndroid Build Coastguard Worker
256*6236dae4SAndroid Build Coastguard Worker## Visible command line arguments
257*6236dae4SAndroid Build Coastguard Worker
258*6236dae4SAndroid Build Coastguard WorkerThe curl command blanks the contents of a number of command line arguments to
259*6236dae4SAndroid Build Coastguard Workerprevent them from appearing in process listings. It does not blank all
260*6236dae4SAndroid Build Coastguard Workerarguments even if some of them that are not blanked might contain sensitive
261*6236dae4SAndroid Build Coastguard Workerdata. We consider this functionality a best-effort and omissions are not
262*6236dae4SAndroid Build Coastguard Workersecurity vulnerabilities.
263*6236dae4SAndroid Build Coastguard Worker
264*6236dae4SAndroid Build Coastguard Worker - not all systems allow the arguments to be blanked in the first place
265*6236dae4SAndroid Build Coastguard Worker - since curl blanks the argument itself they are readable for a short moment
266*6236dae4SAndroid Build Coastguard Worker   no matter what
267*6236dae4SAndroid Build Coastguard Worker - virtually every argument can contain sensitive data, depending on use
268*6236dae4SAndroid Build Coastguard Worker - blanking all arguments would make it impractical for users to differentiate
269*6236dae4SAndroid Build Coastguard Worker   curl command lines in process listings
270*6236dae4SAndroid Build Coastguard Worker
271*6236dae4SAndroid Build Coastguard Worker## Busy-loops
272*6236dae4SAndroid Build Coastguard Worker
273*6236dae4SAndroid Build Coastguard WorkerBusy-loops that consume 100% CPU time but eventually end (perhaps due to a set
274*6236dae4SAndroid Build Coastguard Workertimeout value or otherwise) are not considered security problems. Applications
275*6236dae4SAndroid Build Coastguard Workerare supposed to already handle situations when the transfer loop legitimately
276*6236dae4SAndroid Build Coastguard Workerconsumes 100% CPU time, so while a prolonged such busy-loop is a nasty bug, we
277*6236dae4SAndroid Build Coastguard Workerdo not consider it a security problem.
278*6236dae4SAndroid Build Coastguard Worker
279*6236dae4SAndroid Build Coastguard Worker## Saving files
280*6236dae4SAndroid Build Coastguard Worker
281*6236dae4SAndroid Build Coastguard Workercurl cannot protect against attacks where an attacker has write access to the
282*6236dae4SAndroid Build Coastguard Workersame directory where curl is directed to save files.
283*6236dae4SAndroid Build Coastguard Worker
284*6236dae4SAndroid Build Coastguard Worker## Tricking a user to run a command line
285*6236dae4SAndroid Build Coastguard Worker
286*6236dae4SAndroid Build Coastguard WorkerA creative, misleading or funny looking command line is not a security
287*6236dae4SAndroid Build Coastguard Workerproblem. The curl command line tool takes options and URLs on the command line
288*6236dae4SAndroid Build Coastguard Workerand if an attacker can trick the user to run a specifically crafted curl
289*6236dae4SAndroid Build Coastguard Workercommand line, all bets are off. Such an attacker can just as well have the
290*6236dae4SAndroid Build Coastguard Workeruser run a much worse command that can do something fatal (like
291*6236dae4SAndroid Build Coastguard Worker`sudo rm -rf /`).
292*6236dae4SAndroid Build Coastguard Worker
293*6236dae4SAndroid Build Coastguard Worker## Terminal output and escape sequences
294*6236dae4SAndroid Build Coastguard Worker
295*6236dae4SAndroid Build Coastguard WorkerContent that is transferred from a server and gets displayed in a terminal by
296*6236dae4SAndroid Build Coastguard Workercurl may contain escape sequences or use other tricks to fool the user. This
297*6236dae4SAndroid Build Coastguard Workeris curl working as designed and is not a curl security problem. Escape
298*6236dae4SAndroid Build Coastguard Workersequences, moving cursor, changing color etc, is also frequently used for
299*6236dae4SAndroid Build Coastguard Workergood. To reduce the risk of getting fooled, save files and browse them after
300*6236dae4SAndroid Build Coastguard Workerdownload using a display method that minimizes risks.
301*6236dae4SAndroid Build Coastguard Worker
302*6236dae4SAndroid Build Coastguard Worker## NULL dereferences and crashes
303*6236dae4SAndroid Build Coastguard Worker
304*6236dae4SAndroid Build Coastguard WorkerIf a malicious server can trigger a NULL dereference in curl or otherwise
305*6236dae4SAndroid Build Coastguard Workercause curl to crash (and nothing worse), chances are big that we do not
306*6236dae4SAndroid Build Coastguard Workerconsider that a security problem.
307*6236dae4SAndroid Build Coastguard Worker
308*6236dae4SAndroid Build Coastguard WorkerMalicious servers can already cause considerable harm and denial of service
309*6236dae4SAndroid Build Coastguard Workerlike scenarios without having to trigger such code paths. For example by
310*6236dae4SAndroid Build Coastguard Workerstalling, being terribly slow or by delivering enormous amounts of data.
311*6236dae4SAndroid Build Coastguard WorkerAdditionally, applications are expected to handle "normal" crashes without
312*6236dae4SAndroid Build Coastguard Workerthat being the end of the world.
313*6236dae4SAndroid Build Coastguard Worker
314*6236dae4SAndroid Build Coastguard WorkerThere need to be more and special circumstances to treat such problems as
315*6236dae4SAndroid Build Coastguard Workersecurity issues.
316