Debian Codegraph @

upstream/debian-unstable/man1/perlsecpolicy.1

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "PERLSECPOLICY 1"
58 .TH PERLSECPOLICY 1 2025-11-16 "perl v5.40.1" "Perl Programmers Reference Guide"
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 perlsecpolicy \- Perl security report handling policy
65 .SH DESCRIPTION
66 .IX Header "DESCRIPTION"
67 The Perl project takes security issues seriously.
68 .PP
69 The responsibility for handling security reports in a timely and
70 effective manner has been delegated to a security team composed
71 of a subset of the Perl core developers.
72 .PP
73 This document describes how the Perl security team operates and
74 how the team evaluates new security reports.
75 .SH "REPORTING SECURITY ISSUES IN PERL"
76 .IX Header "REPORTING SECURITY ISSUES IN PERL"
77 If you believe you have found a security vulnerability in the Perl
78 interpreter or modules maintained in the core Perl codebase,
79 email the details to
80 perl\[email protected] <mailto:[email protected]>.
81 This address is a closed membership mailing list monitored by the Perl
82 security team.
83 .PP
84 You should receive an initial response to your report within 72 hours.
85 If you do not receive a response in that time, please contact
86 the Perl Steering Council <mailto:[email protected]>.
87 .PP
88 When members of the security team reply to your messages, they will
89 generally include the perl\[email protected] address in the "To" or "CC"
90 fields of the response. This allows all of the security team to follow
91 the discussion and chime in as needed. Use the "Reply-all" functionality
92 of your email client when you send subsequent responses so that the
93 entire security team receives the message.
94 .PP
95 The security team will evaluate your report and make an initial
96 determination of whether it is likely to fit the scope of issues the
97 team handles. General guidelines about how this is determined are
98 detailed in the "WHAT ARE SECURITY ISSUES" section.
99 .PP
100 If your report meets the team's criteria, an issue will be opened in the
101 team's private issue tracker and you will be provided the issue's ID number.
102 Issue identifiers have the form perl\-security#NNN. Include this identifier
103 with any subsequent messages you send.
104 .PP
105 The security team will send periodic updates about the status of your
106 issue and guide you through any further action that is required to complete
107 the vulnerability remediation process. The stages vulnerabilities typically
108 go through are explained in the "HOW WE DEAL WITH SECURITY ISSUES"
109 section.
110 .SH "WHAT ARE SECURITY ISSUES"
111 .IX Header "WHAT ARE SECURITY ISSUES"
112 A vulnerability is a behavior of a software system that compromises the
113 system's expected confidentiality, integrity or availability protections.
114 .PP
115 A security issue is a bug in one or more specific components of a software
116 system that creates a vulnerability.
117 .PP
118 Software written in the Perl programming language is typically composed
119 of many layers of software written by many different groups. It can be
120 very complicated to determine which specific layer of a complex real-world
121 application was responsible for preventing a vulnerable behavior, but this
122 is an essential part of fixing the vulnerability.
123 .SS "Software covered by the Perl security team"
124 .IX Subsection "Software covered by the Perl security team"
125 The Perl security team handles security issues in:
126 .IP \(bu 4
127 The Perl interpreter
128 .IP \(bu 4
129 The Perl modules shipped with the interpreter that are developed in the core
130 Perl repository
131 .IP \(bu 4
132 The command line tools shipped with the interpreter that are developed in the
133 core Perl repository
134 .PP
135 Files under the \fIcpan/\fR directory in Perl's repository and release tarballs are
136 developed and maintained independently. The Perl security team does not
137 directly handle security issues for these modules, but since this code is
138 bundled with Perl, we will assist in forwarding the issue to the relevant
139 maintainer(s) and you can still report these issues to us in secrecy.
140 .SS "Bugs that may qualify as security issues in Perl"
141 .IX Subsection "Bugs that may qualify as security issues in Perl"
142 Perl is designed to be a fast and flexible general purpose programming
143 language. The Perl interpreter and Perl modules make writing safe and
144 secure applications easy, but they do have limitations.
145 .PP
146 As a general rule, a bug in Perl needs to meet all of the following
147 criteria to be considered a security issue:
148 .IP \(bu 4
149 The vulnerable behavior is not mentioned in Perl's documentation
150 or public issue tracker.
151 .IP \(bu 4
152 The vulnerable behavior is not implied by an expected behavior.
153 .IP \(bu 4
154 The vulnerable behavior is not a generally accepted limitation of
155 the implementation.
156 .IP \(bu 4
157 The vulnerable behavior is likely to be exposed to attack in
158 otherwise secure applications written in Perl.
159 .IP \(bu 4
160 The vulnerable behavior provides a specific tangible benefit
161 to an attacker that triggers the behavior.
162 .SS "Bugs that do not qualify as security issues in Perl"
163 .IX Subsection "Bugs that do not qualify as security issues in Perl"
164 There are certain categories of bugs that are frequently reported to
165 the security team that do not meet the criteria listed above.
166 .PP
167 The following is a list of commonly reported bugs that are not
168 handled as security issues.
169 .PP
170 \fIFeeding untrusted code to the interpreter\fR
171 .IX Subsection "Feeding untrusted code to the interpreter"
172 .PP
173 The Perl parser is not designed to evaluate untrusted code.
174 If your application requires the evaluation of untrusted code, it
175 should rely on an operating system level sandbox for its security.
176 .PP
177 \fIStack overflows due to excessive recursion\fR
178 .IX Subsection "Stack overflows due to excessive recursion"
179 .PP
180 Excessive recursion is often caused by code that does
181 not enforce limits on inputs. The Perl interpreter assumes limits
182 on recursion will be enforced by the application.
183 .PP
184 \fIOut of memory errors\fR
185 .IX Subsection "Out of memory errors"
186 .PP
187 Common Perl constructs such as \f(CW\*(C`pack\*(C'\fR, the \f(CW\*(C`x\*(C'\fR operator,
188 and regular expressions accept numeric quantifiers that control how
189 much memory will be allocated to store intermediate values or results.
190 If you allow an attacker to supply these quantifiers and consume all
191 available memory, the Perl interpreter will not prevent it.
192 .PP
193 \fIEscape from a Safe compartment\fR
194 .IX Subsection "Escape from a Safe compartment"
195 .PP
196 Opcode restrictions and Safe compartments are not supported as
197 security mechanisms. The Perl parser is not designed to evaluate
198 untrusted code.
199 .PP
200 \fIUse of the \fR\f(CI\*(C`p\*(C'\fR\fI and \fR\f(CI\*(C`P\*(C'\fR\fI pack templates\fR
201 .IX Subsection "Use of the p and P pack templates"
202 .PP
203 These templates are unsafe by design.
204 .PP
205 \fIStack not reference-counted issues\fR
206 .IX Subsection "Stack not reference-counted issues"
207 .PP
208 These bugs typically present as use-after-free errors or as assertion
209 failures on the type of a \f(CW\*(C`SV\*(C'\fR. Stack not reference-counted
210 crashes usually occur because code is both modifying a reference or
211 glob and using the values referenced by that glob or reference.
212 .PP
213 This type of bug is a long standing issue with the Perl interpreter
214 that seldom occurs in normal code. Examples of this type of bug
215 generally assume that attacker-supplied code will be evaluated by
216 the Perl interpreter.
217 .PP
218 \fIThawing attacker-supplied data with Storable\fR
219 .IX Subsection "Thawing attacker-supplied data with Storable"
220 .PP
221 Storable is designed to be a very fast serialization format.
222 It is not designed to be safe for deserializing untrusted inputs.
223 .PP
224 \fIUsing attacker supplied SDBM_File databases\fR
225 .IX Subsection "Using attacker supplied SDBM_File databases"
226 .PP
227 The SDBM_File module is not intended for use with untrusted SDBM
228 databases.
229 .PP
230 \fIBadly encoded UTF\-8 flagged scalars\fR
231 .IX Subsection "Badly encoded UTF-8 flagged scalars"
232 .PP
233 This type of bug occurs when the \f(CW\*(C`:utf8\*(C'\fR PerlIO layer is used to
234 read badly encoded data, or other mechanisms are used to directly
235 manipulate the UTF\-8 flag on an SV.
236 .PP
237 A badly encoded UTF\-8 flagged SV is not a valid SV. Code that
238 creates SV's in this fashion is corrupting Perl's internal state.
239 .PP
240 \fIIssues that exist only in blead, or in a release candidate\fR
241 .IX Subsection "Issues that exist only in blead, or in a release candidate"
242 .PP
243 The blead branch and Perl release candidates do not receive security
244 support. Security defects that are present only in pre-release
245 versions of Perl are handled through the normal bug reporting and
246 resolution process.
247 .PP
248 \fICPAN modules or other Perl project resources\fR
249 .IX Subsection "CPAN modules or other Perl project resources"
250 .PP
251 The Perl security team is focused on the Perl interpreter and modules
252 maintained in the core Perl codebase. The team has no special access
253 to fix CPAN modules, applications written in Perl, Perl project websites,
254 Perl mailing lists or the Perl IRC servers.
255 .PP
256 \fIEmulated POSIX behaviors on Windows systems\fR
257 .IX Subsection "Emulated POSIX behaviors on Windows systems"
258 .PP
259 The Perl interpreter attempts to emulate \f(CW\*(C`fork\*(C'\fR, \f(CW\*(C`system\*(C'\fR, \f(CW\*(C`exec\*(C'\fR
260 and other POSIX behaviors on Windows systems. This emulation has many
261 quirks that are extensively documented in Perl's public issue tracker.
262 Changing these behaviors would cause significant disruption for existing
263 users on Windows.
264 .SS "Bugs that require special categorization"
265 .IX Subsection "Bugs that require special categorization"
266 Some bugs in the Perl interpreter occur in areas of the codebase that are
267 both security sensitive and prone to failure during normal usage.
268 .PP
269 \fIRegular expressions\fR
270 .IX Subsection "Regular expressions"
271 .PP
272 Untrusted regular expressions are generally safe to compile and match against
273 with several caveats. The following behaviors of Perl's regular expression
274 engine are the developer's responsibility to constrain.
275 .PP
276 The evaluation of untrusted regular expressions while \f(CW\*(C`use re \*(Aqeval\*(Aq;\*(C'\fR is
277 in effect is never safe.
278 .PP
279 Regular expressions are not guaranteed to compile or evaluate in any specific
280 finite time frame.
281 .PP
282 Regular expressions may consume all available system memory when they are
283 compiled or evaluated.
284 .PP
285 Regular expressions may cause excessive recursion that halts the perl
286 interpreter.
287 .PP
288 As a general rule, do not expect Perl's regular expression engine to
289 be resistant to denial of service attacks.
290 .PP
291 \fIDB_File, ODBM_File, or GDBM_File databases\fR
292 .IX Subsection "DB_File, ODBM_File, or GDBM_File databases"
293 .PP
294 These modules rely on external libraries to interact with database files.
295 .PP
296 Bugs caused by reading and writing these file formats are generally caused
297 by the underlying library implementation and are not security issues in
298 Perl.
299 .PP
300 Bugs where Perl mishandles unexpected valid return values from the underlying
301 libraries may qualify as security issues in Perl.
302 .PP
303 \fIAlgorithmic complexity attacks\fR
304 .IX Subsection "Algorithmic complexity attacks"
305 .PP
306 The perl interpreter is reasonably robust to algorithmic complexity
307 attacks. It is not immune to them.
308 .PP
309 Algorithmic complexity bugs that depend on the interpreter processing
310 extremely large amounts of attacker supplied data are not generally handled
311 as security issues.
312 .PP
313 See "Algorithmic Complexity Attacks" in perlsec for additional information.
314 .SH "HOW WE DEAL WITH SECURITY ISSUES"
315 .IX Header "HOW WE DEAL WITH SECURITY ISSUES"
316 The Perl security team follows responsible disclosure practices. Security issues
317 are kept secret until a fix is readily available for most users. This minimizes
318 inherent risks users face from vulnerabilities in Perl.
319 .PP
320 Hiding problems from the users temporarily is a necessary trade-off to keep
321 them safe. Hiding problems from users permanently is not the goal.
322 .PP
323 When you report a security issue privately to the
324 perl\[email protected] <mailto:[email protected]> contact address, we
325 normally expect you to follow responsible disclosure practices in the handling
326 of the report. If you are unable or unwilling to keep the issue secret until
327 a fix is available to users you should state this clearly in the initial
328 report.
329 .PP
330 The security team's vulnerability remediation workflow is intended to be as
331 open and transparent as possible about the state of your security report.
332 .SS "Perl's vulnerability remediation workflow"
333 .IX Subsection "Perl's vulnerability remediation workflow"
334 \fIInitial contact\fR
335 .IX Subsection "Initial contact"
336 .PP
337 New vulnerability reports will receive an initial reply within 72 hours
338 from the time they arrive at the security team's mailing list. If you do
339 not receive any response in that time, contact the
340 Perl Steering Council <mailto:[email protected]>.
341 .PP
342 The initial response sent by the security team will confirm your message was
343 received and provide an estimated time frame for the security team's
344 triage analysis.
345 .PP
346 \fIInitial triage\fR
347 .IX Subsection "Initial triage"
348 .PP
349 The security team will evaluate the report and determine whether or not
350 it is likely to meet the criteria for handling as a security issue.
351 .PP
352 The security team aims to complete the initial report triage within
353 two weeks' time. Complex issues that require significant discussion or
354 research may take longer.
355 .PP
356 If the security report cannot be reproduced or does not meet the team's
357 criteria for handling as a security issue, you will be notified by email
358 and given an opportunity to respond.
359 .PP
360 \fIIssue ID assignment\fR
361 .IX Subsection "Issue ID assignment"
362 .PP
363 Security reports that pass initial triage analysis are turned into issues
364 in the security team's private issue tracker. When a report progresses to
365 this point you will be provided the issue ID for future reference. These
366 identifiers have the format perl\-security#NNN or Perl/perl\-security#NNN.
367 .PP
368 The assignment of an issue ID does not confirm that a security report
369 represents a vulnerability in Perl. Many reports require further analysis
370 to reach that determination.
371 .PP
372 Issues in the security team's private tracker are used to collect details
373 about the problem and track progress towards a resolution. These notes and
374 other details are not made public when the issue is resolved. Keeping the
375 issue notes private allows the security team to freely discuss attack
376 methods, attack tools, and other related private issues.
377 .PP
378 \fIDevelopment of patches\fR
379 .IX Subsection "Development of patches"
380 .PP
381 Members of the security team will inspect the report and related code in
382 detail to produce fixes for supported versions of Perl.
383 .PP
384 If the team discovers that the reported issue does not meet the team's
385 criteria at this stage, you will be notified by email and given an
386 opportunity to respond before the issue is closed.
387 .PP
388 The team may discuss potential fixes with you or provide you with
389 patches for testing purposes during this time frame. No information
390 should be shared publicly at this stage.
391 .PP
392 \fICVE ID assignment\fR
393 .IX Subsection "CVE ID assignment"
394 .PP
395 Once an issue is fully confirmed and a potential fix has been found,
396 the security team will request a CVE identifier for the issue to use
397 in public announcements.
398 .PP
399 Details like the range of vulnerable Perl versions and identities
400 of the people that discovered the flaw need to be collected to submit
401 the CVE ID request.
402 .PP
403 The security team may ask you to clarify the exact name we should use
404 when crediting discovery of the issue. The
405 "Vulnerability credit and bounties" section of this document
406 explains our preferred format for this credit.
407 .PP
408 Once a CVE ID has been assigned, you will be notified by email.
409 The vulnerability should not be discussed publicly at this stage.
410 .PP
411 \fIPre-release notifications\fR
412 .IX Subsection "Pre-release notifications"
413 .PP
414 When the security team is satisfied that the fix for a security issue
415 is ready to release publicly, a pre-release notification
416 announcement is sent to the major redistributors of Perl.
417 .PP
418 This pre-release announcement includes a list of Perl versions that
419 are affected by the flaw, an analysis of the risks to users, patches
420 the security team has produced, and any information about mitigations
421 or backporting fixes to older versions of Perl that the security team
422 has available.
423 .PP
424 The pre-release announcement will include a specific target date
425 when the issue will be announced publicly. The time frame between
426 the pre-release announcement and the release date allows redistributors
427 to prepare and test their own updates and announcements. During this
428 period the vulnerability details and fixes are embargoed and should not
429 be shared publicly. This embargo period may be extended further if
430 problems are discovered during testing.
431 .PP
432 You will be sent the portions of pre-release announcements that are
433 relevant to the specific issue you reported. This email will include
434 the target release date. Additional updates will be sent if the
435 target release date changes.
436 .PP
437 \fIPre-release testing\fR
438 .IX Subsection "Pre-release testing"
439 .PP
440 The Perl security team does not directly produce official Perl
441 releases. The team releases security fixes by placing commits
442 in Perl's public git repository and sending announcements.
443 .PP
444 Many users and redistributors prefer using official Perl releases
445 rather than applying patches to an older release. The security
446 team works with Perl's release managers to make this possible.
447 .PP
448 New official releases of Perl are generally produced and tested
449 on private systems during the pre-release embargo period.
450 .PP
451 \fIRelease of fixes and announcements\fR
452 .IX Subsection "Release of fixes and announcements"
453 .PP
454 At the end of the embargo period the security fixes will be
455 committed to Perl's public git repository and announcements will be
456 sent to the perl5\-porters <https://lists.perl.org/list/perl5-porters.html>
457 and oss-security <https://oss-security.openwall.org/wiki/mailing-lists/oss-security>
458 mailing lists.
459 .PP
460 If official Perl releases are ready, they will be published at this time
461 and announced on the perl5\-porters <https://lists.perl.org/list/perl5-porters.html>
462 mailing list.
463 .PP
464 The security team will send a follow-up notification to everyone that
465 participated in the pre-release embargo period once the release process is
466 finished. Vulnerability reporters and Perl redistributors should not publish
467 their own announcements or fixes until the Perl security team's release process
468 is complete.
469 .SS "Publicly known and zero-day security issues"
470 .IX Subsection "Publicly known and zero-day security issues"
471 The security team's vulnerability remediation workflow assumes that issues
472 are reported privately and kept secret until they are resolved. This isn't
473 always the case and information occasionally leaks out before a fix is ready.
474 .PP
475 In these situations the team must decide whether operating in secret increases
476 or decreases the risk to users of Perl. In some cases being open about
477 the risk a security issue creates will allow users to defend against it,
478 in other cases calling attention to an unresolved security issue will
479 make it more likely to be misused.
480 .PP
481 \fIZero-day security issues\fR
482 .IX Subsection "Zero-day security issues"
483 .PP
484 If an unresolved critical security issue in Perl is being actively abused to
485 attack systems the security team will send out announcements as rapidly as
486 possible with any mitigations the team has available.
487 .PP
488 Perl's public defect tracker will be used to handle the issue so that additional
489 information, fixes, and CVE IDs are visible to affected users as rapidly as
490 possible.
491 .PP
492 \fIOther leaks of security issue information\fR
493 .IX Subsection "Other leaks of security issue information"
494 .PP
495 Depending on the prominence of the information revealed about a security
496 issue and the issue's risk of becoming a zero-day attack, the security team may
497 skip all or part of its normal remediation workflow.
498 .PP
499 If the security team learns of a significant security issue after it has been
500 identified and resolved in Perl's public issue tracker, the team will
501 request a CVE ID and send an announcement to inform users.
502 .SS "Vulnerability credit and bounties"
503 .IX Subsection "Vulnerability credit and bounties"
504 The Perl project appreciates the effort security researchers
505 invest in making Perl safe and secure.
506 .PP
507 Since much of this work is hidden from the public, crediting
508 researchers publicly is an important part of the vulnerability
509 remediation process.
510 .PP
511 \fICredits in vulnerability announcements\fR
512 .IX Subsection "Credits in vulnerability announcements"
513 .PP
514 When security issues are fixed we will attempt to credit the specific
515 researcher(s) that discovered the flaw in our announcements.
516 .PP
517 Credits are announced using the researcher's preferred full name.
518 .PP
519 If the researcher's contributions were funded by a specific company or
520 part of an organized vulnerability research project, we will include
521 a short name for this group at the researcher's request.
522 .PP
523 Perl's announcements are written in the English language using the 7bit
524 ASCII character set to be reproducible in a variety of formats. We
525 do not include hyperlinks, domain names or marketing material with these
526 acknowledgments.
527 .PP
528 In the event that proper credit for vulnerability discovery cannot be
529 established or there is a disagreement between the Perl security team
530 and the researcher about how the credit should be given, it will be
531 omitted from announcements.
532 .PP
533 \fIBounties for Perl vulnerabilities\fR
534 .IX Subsection "Bounties for Perl vulnerabilities"
535 .PP
536 The Perl project is a non-profit volunteer effort. We do not provide
537 any monetary rewards for reporting security issues in Perl.