security-bugs.rst 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. .. _securitybugs:
  2. Security bugs
  3. =============
  4. Linux kernel developers take security very seriously. As such, we'd
  5. like to know when a security bug is found so that it can be fixed and
  6. disclosed as quickly as possible.
  7. Preparing your report
  8. ---------------------
  9. Like with any bug report, a security bug report requires a lot of analysis work
  10. from the developers, so the more information you can share about the issue, the
  11. better. Please review the procedure outlined in
  12. Documentation/admin-guide/reporting-issues.rst if you are unclear about what
  13. information is helpful. The following information are absolutely necessary in
  14. **any** security bug report:
  15. * **affected kernel version range**: with no version indication, your report
  16. will not be processed. A significant part of reports are for bugs that
  17. have already been fixed, so it is extremely important that vulnerabilities
  18. are verified on recent versions (development tree or latest stable
  19. version), at least by verifying that the code has not changed since the
  20. version where it was detected.
  21. * **description of the problem**: a detailed description of the problem, with
  22. traces showing its manifestation, and why you consider that the observed
  23. behavior as a problem in the kernel, is necessary.
  24. * **reproducer**: developers will need to be able to reproduce the problem to
  25. consider a fix as effective. This includes both a way to trigger the issue
  26. and a way to confirm it happens. A reproducer with low complexity
  27. dependencies will be needed (source code, shell script, sequence of
  28. instructions, file-system image etc). Binary-only executables are not
  29. accepted. Working exploits are extremely helpful and will not be released
  30. without consent from the reporter, unless they are already public. By
  31. definition if an issue cannot be reproduced, it is not exploitable, thus it
  32. is not a security bug.
  33. * **conditions**: if the bug depends on certain configuration options,
  34. sysctls, permissions, timing, code modifications etc, these should be
  35. indicated.
  36. In addition, the following information are highly desirable:
  37. * **suspected location of the bug**: the file names and functions where the
  38. bug is suspected to be present are very important, at least to help forward
  39. the report to the appropriate maintainers. When not possible (for example,
  40. "system freezes each time I run this command"), the security team will help
  41. identify the source of the bug.
  42. * **a proposed fix**: bug reporters who have analyzed the cause of a bug in
  43. the source code almost always have an accurate idea on how to fix it,
  44. because they spent a long time studying it and its implications. Proposing
  45. a tested fix will save maintainers a lot of time, even if the fix ends up
  46. not being the right one, because it helps understand the bug. When
  47. proposing a tested fix, please always format it in a way that can be
  48. immediately merged (see Documentation/process/submitting-patches.rst).
  49. This will save some back-and-forth exchanges if it is accepted, and you
  50. will be credited for finding and fixing this issue. Note that in this case
  51. only a ``Signed-off-by:`` tag is needed, without ``Reported-by:`` when the
  52. reporter and author are the same.
  53. * **mitigations**: very often during a bug analysis, some ways of mitigating
  54. the issue appear. It is useful to share them, as they can be helpful to
  55. keep end users protected during the time it takes them to apply the fix.
  56. Identifying contacts
  57. --------------------
  58. The most effective way to report a security bug is to send it directly to the
  59. affected subsystem's maintainers and Cc: the Linux kernel security team. Do
  60. not send it to a public list at this stage, unless you have good reasons to
  61. consider the issue as being public or trivial to discover (e.g. result of a
  62. widely available automated vulnerability scanning tool that can be repeated by
  63. anyone).
  64. If you're sending a report for issues affecting multiple parts in the kernel,
  65. even if they're fairly similar issues, please send individual messages (think
  66. that maintainers will not all work on the issues at the same time). The only
  67. exception is when an issue concerns closely related parts maintained by the
  68. exact same subset of maintainers, and these parts are expected to be fixed all
  69. at once by the same commit, then it may be acceptable to report them at once.
  70. One difficulty for most first-time reporters is to figure the right list of
  71. recipients to send a report to. In the Linux kernel, all official maintainers
  72. are trusted, so the consequences of accidentally including the wrong maintainer
  73. are essentially a bit more noise for that person, i.e. nothing dramatic. As
  74. such, a suitable method to figure the list of maintainers (which kernel
  75. security officers use) is to rely on the get_maintainer.pl script, tuned to
  76. only report maintainers. This script, when passed a file name, will look for
  77. its path in the MAINTAINERS file to figure a hierarchical list of relevant
  78. maintainers. Calling it a first time with the finest level of filtering will
  79. most of the time return a short list of this specific file's maintainers::
  80. $ ./scripts/get_maintainer.pl --no-l --no-r --pattern-depth 1 \
  81. drivers/example.c
  82. Developer One <dev1@example.com> (maintainer:example driver)
  83. Developer Two <dev2@example.org> (maintainer:example driver)
  84. These two maintainers should then receive the message. If the command does not
  85. return anything, it means the affected file is part of a wider subsystem, so we
  86. should be less specific::
  87. $ ./scripts/get_maintainer.pl --no-l --no-r drivers/example.c
  88. Developer One <dev1@example.com> (maintainer:example subsystem)
  89. Developer Two <dev2@example.org> (maintainer:example subsystem)
  90. Developer Three <dev3@example.com> (maintainer:example subsystem [GENERAL])
  91. Developer Four <dev4@example.org> (maintainer:example subsystem [GENERAL])
  92. Here, picking the first, most specific ones, is sufficient. When the list is
  93. long, it is possible to produce a comma-delimited e-mail address list on a
  94. single line suitable for use in the To: field of a mailer like this::
  95. $ ./scripts/get_maintainer.pl --no-tree --no-l --no-r --no-n --m \
  96. --no-git-fallback --no-substatus --no-rolestats --no-multiline \
  97. --pattern-depth 1 drivers/example.c
  98. dev1@example.com, dev2@example.org
  99. or this for the wider list::
  100. $ ./scripts/get_maintainer.pl --no-tree --no-l --no-r --no-n --m \
  101. --no-git-fallback --no-substatus --no-rolestats --no-multiline \
  102. drivers/example.c
  103. dev1@example.com, dev2@example.org, dev3@example.com, dev4@example.org
  104. If at this point you're still facing difficulties spotting the right
  105. maintainers, **and only in this case**, it's possible to send your report to
  106. the Linux kernel security team only. Your message will be triaged, and you
  107. will receive instructions about whom to contact, if needed. Your message may
  108. equally be forwarded as-is to the relevant maintainers.
  109. Sending the report
  110. ------------------
  111. Reports are to be sent over e-mail exclusively. Please use a working e-mail
  112. address, preferably the same that you want to appear in ``Reported-by`` tags
  113. if any. If unsure, send your report to yourself first.
  114. The security team and maintainers almost always require additional
  115. information beyond what was initially provided in a report and rely on
  116. active and efficient collaboration with the reporter to perform further
  117. testing (e.g., verifying versions, configuration options, mitigations, or
  118. patches). Before contacting the security team, the reporter must ensure
  119. they are available to explain their findings, engage in discussions, and
  120. run additional tests. Reports where the reporter does not respond promptly
  121. or cannot effectively discuss their findings may be abandoned if the
  122. communication does not quickly improve.
  123. The report must be sent to maintainers, with the security team in ``Cc:``.
  124. The Linux kernel security team can be contacted by email at
  125. <security@kernel.org>. This is a private list of security officers
  126. who will help verify the bug report and assist developers working on a fix.
  127. It is possible that the security team will bring in extra help from area
  128. maintainers to understand and fix the security vulnerability.
  129. Please send **plain text** emails without attachments where possible.
  130. It is much harder to have a context-quoted discussion about a complex
  131. issue if all the details are hidden away in attachments. Think of it like a
  132. :doc:`regular patch submission <../process/submitting-patches>`
  133. (even if you don't have a patch yet): describe the problem and impact, list
  134. reproduction steps, and follow it with a proposed fix, all in plain text.
  135. Markdown, HTML and RST formatted reports are particularly frowned upon since
  136. they're quite hard to read for humans and encourage to use dedicated viewers,
  137. sometimes online, which by definition is not acceptable for a confidential
  138. security report. Note that some mailers tend to mangle formatting of plain
  139. text by default, please consult Documentation/process/email-clients.rst for
  140. more info.
  141. Disclosure and embargoed information
  142. ------------------------------------
  143. The security list is not a disclosure channel. For that, see Coordination
  144. below.
  145. Once a robust fix has been developed, the release process starts. Fixes
  146. for publicly known bugs are released immediately.
  147. Although our preference is to release fixes for publicly undisclosed bugs
  148. as soon as they become available, this may be postponed at the request of
  149. the reporter or an affected party for up to 7 calendar days from the start
  150. of the release process, with an exceptional extension to 14 calendar days
  151. if it is agreed that the criticality of the bug requires more time. The
  152. only valid reason for deferring the publication of a fix is to accommodate
  153. the logistics of QA and large scale rollouts which require release
  154. coordination.
  155. While embargoed information may be shared with trusted individuals in
  156. order to develop a fix, such information will not be published alongside
  157. the fix or on any other disclosure channel without the permission of the
  158. reporter. This includes but is not limited to the original bug report
  159. and followup discussions (if any), exploits, CVE information or the
  160. identity of the reporter.
  161. In other words our only interest is in getting bugs fixed. All other
  162. information submitted to the security list and any followup discussions
  163. of the report are treated confidentially even after the embargo has been
  164. lifted, in perpetuity.
  165. Coordination with other groups
  166. ------------------------------
  167. While the kernel security team solely focuses on getting bugs fixed,
  168. other groups focus on fixing issues in distros and coordinating
  169. disclosure between operating system vendors. Coordination is usually
  170. handled by the "linux-distros" mailing list and disclosure by the
  171. public "oss-security" mailing list, both of which are closely related
  172. and presented in the linux-distros wiki:
  173. <https://oss-security.openwall.org/wiki/mailing-lists/distros>
  174. Please note that the respective policies and rules are different since
  175. the 3 lists pursue different goals. Coordinating between the kernel
  176. security team and other teams is difficult since for the kernel security
  177. team occasional embargoes (as subject to a maximum allowed number of
  178. days) start from the availability of a fix, while for "linux-distros"
  179. they start from the initial post to the list regardless of the
  180. availability of a fix.
  181. As such, the kernel security team strongly recommends that as a reporter
  182. of a potential security issue you DO NOT contact the "linux-distros"
  183. mailing list UNTIL a fix is accepted by the affected code's maintainers
  184. and you have read the distros wiki page above and you fully understand
  185. the requirements that contacting "linux-distros" will impose on you and
  186. the kernel community. This also means that in general it doesn't make
  187. sense to Cc: both lists at once, except maybe for coordination if and
  188. while an accepted fix has not yet been merged. In other words, until a
  189. fix is accepted do not Cc: "linux-distros", and after it's merged do not
  190. Cc: the kernel security team.
  191. CVE assignment
  192. --------------
  193. The security team does not assign CVEs, nor do we require them for
  194. reports or fixes, as this can needlessly complicate the process and may
  195. delay the bug handling. If a reporter wishes to have a CVE identifier
  196. assigned for a confirmed issue, they can contact the :doc:`kernel CVE
  197. assignment team<../process/cve>` to obtain one.
  198. Non-disclosure agreements
  199. -------------------------
  200. The Linux kernel security team is not a formal body and therefore unable
  201. to enter any non-disclosure agreements.