Git Product home page Git Product logo

foundation-security-advisories's Introduction

MFSA: Mozilla Foundation Security Advisories

Canonical source for Mozilla Foundation Security Advisories. http://www.mozilla.org/security/announce/

Build Status

Writing new announcements

Announcements are written in Markdown or YAML. They should be named in the pattern announce/YYYY/mfsaYYYY-XX.EXT where YYYY is the 4 digit year, XX is the next in the sequence, and EXT is either md or yml.

Markdown Format

Once the file is created some data about the file should be added to the Front Matter. Front Matter is YAML encoded data surrounded by lines consisting of 3 dashes. Then the Markdown content can be added below the Front Matter. For example:

---
announced: April 29, 2014
fixed_in:
- Firefox 29
- Firefox ESR 24.5
- Thunderbird 24.5
- Seamonkey 2.26
impact: High
reporter: Abhishek Arya
title: Buffer overflow when using non-XBL object as XBL
---

### Description

Mozilla community member **James Kitchener** reported a crash in
DirectWrite when rendering MathML content with specific fonts due to an error in
how font resources and tables are handled. This leads to use-after-free of a
DirectWrite font-face object, resulting in a potentially exploitable crash.

NOTE: There is no need to include the MFSA ID in the front matter, it will be extracted from the file name.

NOTE: HTML is valid Markdown. So if you need extra features or classes, just add them.

Metadata spec

There are some required elements in the Front Matter data (metadata). They are:

announced: Date in Month Day, Year format
fixed_in: List of product names and versions (see example above)
impact: one of (Critical, High, Moderate, Low)
reporter: Name of bug reporter
title: Title of the advisory (may contain HTML).

Other data will be displayed, but the above will be expected in the template and styled correctly.

NOTE: You should NOT add a products: section to the data. The list of products is extracted from the fixed_in: list when imported into the website.

YAML Format

The YAML type is for advisories that are actually a roll-up of multiple advisories. These files are all YAML as opposed to the .md files which are only partially YAML. The following example should demonstrate the features of this file type:

announced: September 20, 2016
fixed_in:
- Thunderbird 45.4
title: Security vulnerabilities fixed in Thunderbird 45.4
description: |
  Text that will appear at the top of the file. ***Markdown*** allowed.
  
  ### An h3 is sometimes good
  
  Then you can explain further.
advisories:
  CVE-2016-5270:
    title: Heap-buffer-overflow in nsCaseTransformTextRunFactory::TransformString
    impact: high
    reporter: Atte Kettunen
    description: |
      Short description <strong>with HTML</strong> and multiple lines!

      Can also have full breaks and ***markdown***!
    bugs:
      - url: 1291016
        desc: The text for the bug link
  CVE-2016-5272:
    title: Bad cast in nsImageGeometryMixin
    impact: high
    reporter: Abhishek Arya
    description: A bad cast when processing layout with <code>input</code> elements can result in a potentially exploitable crash.
    bugs:
      - url: 1297934
  CVE-2016-5276:
    title: Heap-use-after-free in mozilla::a11y::DocAccessible::ProcessInvalidationList
    impact: high
    reporter: Nils
    description: A use-after-free vulnerability triggered by setting a <code>aria-owns</code> attribute
    bugs:
      - url: 1287721

The main part of the data is the same as the front-matter of the .md files. The primary difference is the advisories key, which contains a list of CVEs with their individual data. A CVE entry can have a list of bug urls. These can be:

  • A bugzilla bug number. These will be converted to a bugzilla link.
  • A comma separated list of bug numbers. These will be converted to a link to a bugzilla list of bugs.
  • A valid URL will be kept as is.

Along with the url field of a bug, a desc may optionally be supplied. This will be the link text for the bug link. If it is not supplied the default is Bug {url}. For example, the link text for the bug in CVE-2016-5276 above would be Bug 1287721.

The main description field as well as those of the CVE entries can be multi-line and will be processed as markdown. The YAML spec provides different ways of enabling multi-line, but the best for this application is to use the | character after the : like you see in the example for the main description and CVE-2016-5270 above.

Bug Bounty Hall of Fame Files

This repo also contains data that bedrock uses to generate the client and web hall of fame pages. These are the YAML files in the bug-bounty-hof directory. The data format for these YAML files is rather simple. The only required field in the file is names: this is a list of data structures about each name in the hall of fame. For each name entry only name and date are required. The date field must be in the format YYYY-MM-DD. You can optionally add a url field and the entry on the page will link to this url. You are free to add other data to each entry (e.g. bug, organization), but at present bedrock will not use these items on the site.

Linter Script

There is a script in the repo called check_advisories.py that will tell you when you've gotten something wrong. It uses the same parsing algorithm as bedrock and so it should catch errors before they cause problems on the website. By default it will check all modified advisory and bug bounty hall-of-fame files in the repo. If you want to check them all you can pass the --all switch. And if you only want it to check the changes staged in git's index you can pass the --staged switch (this is mostly good for a git pre-commit hook).

You'll need a couple of dependency libraries. You can get them with the following command:

$ pip install ./

It's best to do that within a virtualenv. Then you can run the command:

$ check_advisories
Checked 3 files. Found 0 errors.

Use the --help switch to see all options.

Use as a git hook

The best way to use this linter script is to add a git pre-commit hook. Included in the repo is a shell script useful for this purpose. To install it issue the following commands from the root directory of the repo:

$ cd .git/hooks && ln -s ../../pre-commit-hook.sh pre-commit

After this if you attempt to commit a change to a file that has a problem being parsed, you'll be informed which file has a problem and the commit will be aborted.

Assignment and Release Process

Advisories are written and assigned as per the process described in the Security/Firefox/Security Bug Life Cycle/Security Advisories wiki page. Once advisories have a CVE id, and are pushed to the master branch of this repository (mozilla/foundation-security-advisories), they will automatically be published to CVE Services by GitHub Actions running the publish_cve_advisories script. This will also update already published advisories, for example in cases of a typo.

foundation-security-advisories's People

Contributors

albill avatar april avatar bayounetta avatar bensternthal avatar cr avatar dnarcese avatar donalme avatar dsmithpadilla avatar dveditz avatar ewongbb avatar fkiriakos07 avatar fox-rose avatar freddyb avatar garvankeeley avatar gene1wood avatar github-actions[bot] avatar jcristau avatar jgmize avatar kyoshino avatar lmarceau avatar maltejur avatar mattreaganmozilla avatar mozfreddyb avatar pascalchevrel avatar pmac avatar pyoor avatar rforbes avatar rvandermeulen avatar stevejalim avatar tomrittervg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

foundation-security-advisories's Issues

CODE_OF_CONDUCT.md file missing

As of January 1 2019, Mozilla requires that all GitHub projects include this CODE_OF_CONDUCT.md file in the project root. The file has two parts:

  1. Required Text - All text under the headings Community Participation Guidelines and How to Report, are required, and should not be altered.
  2. Optional Text - The Project Specific Etiquette heading provides a space to speak more specifically about ways people can work effectively and inclusively together. Some examples of those can be found on the Firefox Debugger project, and Common Voice. (The optional part is commented out in the raw template file, and will not be visible until you modify and uncomment that part.)

If you have any questions about this file, or Code of Conduct policies and procedures, please see Mozilla-GitHub-Standards or email [email protected].

(Message COC001)

Link in recent sec advisory has restricted access

The link below (from https://www.mozilla.org/en-US/security/advisories/mfsa2023-40/) goes to a page which requires Google Account authentication and, presumably because I get Access Denied after authenticating with a non-Mozilla account, appropriate access to view it.

Not sure if the permissions need to change, or if it's ok to have a closed link in the sec advisory, but flagging it here for a decision. Thanks very much in advance!

- url: https://bugs.chromium.org/p/chromium/issues/detail?id=1479274

Provice RSS Feed and/or ml annoucment

I want to be notified when a new security release is available, but there isn't anyway to be notified.

A RSS Feed or a ml announcement could be useful.

Travis CI free usage ends Dec 3; mozilla repos should switch to other CI platforms

We're opening this issue because your project has used Travis CI within the last 6 months. If you have already migrated off it, you can close and ignore this issue.

Travis CI is ending free builds on public repositories. travis-ci.com stopped providingthem in early November, and travis-ci.org will stop after December 31, 2020. To avoid disruptions to your workflows, you must migrate to another CI service.

For production use cases, we recommend switching to CircleCI. This service is already widely used within Mozilla. There is a guide to migrating from Travis CI to CircleCI available here.

For non production use cases, we recommend either CircleCI or Github Actions. There is a guide to migrating from Travis CI to Github Actions available here. Github Actions usage within Mozilla is new, and you will have to work with our github administrators to enable specific actions following this process.

If you have any questions, reach out in #github-admin:mozilla.org on matrix.

Incorrect advisory

CVE-2022-42930:
title: Potential use-after-free in SVG Images
impact: moderate
reporter: Timothy Nikkel
description: |
A potential use-after-free vulnerability existed in SVG Images if the Refresh Driver was destroyed at an inopportune time. This could have lead to memory corruption or a potentially exploitable crash.<br />*Note*: This advisory was added on December 13th, 2022 after discovering it was inadvertently left out of the original advisory. The fix was included in the original release of Firefox 106.
bugs:
- url: 1786818
CVE-2022-42930:

Both Line 42 and Line 50 refer to the same CVE CVE-2022-42930

However the bugzilla points to CVE-2022-46884 as the correct CVE

HOF Script won't find some entries

If you file a bug, it's not resolved, but we award it a hof+, we will almost certainly not add it to the hof, because the script doesn't look for "show me when this bug had the hof+ flag added" - it only uses the bug's creation date.

But we should be able to query a bug's change history from bugzilla to do this better...

Add an extra syntax check in check_advisories.py

For the 71 release, bedrock failed to parse our yaml files and put them in their database, yet no error was reported by our linter.

I found that we had this syntax in the new files

bugs:
      - url: 1449736, 1533957, 1560667, 1567209, 1580288, 1585760, 1592502
      - desc: Memory safety bugs fixed in Firefox 71 and Firefox ESR 68.3

While in older released we had:

bugs:
      - url: 1558522, 1577061, 1548044, 1571223, 1573048, 1578933, 1575217, 1583684, 1586845, 1581950, 1583463, 1586599
        desc: Memory safety bugs fixed in Firefox 70 and Firefox ESR 68.2

Note the extra dash in front of the desc key.

We should have a check that the desc key should not have a dash in front or something like that.

Advisories check script gives errors with python 3.10 (but works with 3.8)

The python script does not seem to work correctly with Python 3.10 (default on Ubuntu 22.04). There is no error in creating the virtualenv and installing the dependencies, but running check_advisories --all yields parsing errors:

check_advisories --all
Checking all files
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE..
Checked 1253 files. Found 1251 errors.

ERRORS:
  - announce/2011/mfsa2011-02.md: Failed to parse "March 1, 2011" as a date
  - announce/2011/mfsa2011-29.md: Failed to parse "August 16, 2011" as a date
  - announce/2011/mfsa2011-51.md: Failed to parse "November 8, 2011" as a date
...

Looking at the circle-ci script in the repo, it indicates that CI runs with Python 3.8 so I installed an alternate 3.8 version alongside my distro version reinstalled the dependencies in the virtualenv and everything works fine now.

I think it would be good to have the script work with other recent versions of Python.

Distinctive difference between package name and version

Hi
I'm writing a package url for the packages in the advisories and I would need the names and versions of packages explicitly. Currently, it appears that the pattern follows package_name version and package_name is also allowed to have spaces.
Though there is no validation to make sure this pattern follows.

Something like the following should be fine:

pkg.split(" ")[-1].replace('.','').isdigit()

Migrate Pocket's bug bounty program to Mozilla

Pocket independently operates their own bounty program through HackerOne. Let's get this under Mozilla's program and classify Pocket's web properties.

It's been requested that Pocket's HoF list be maintained somehow throughout this migration.

Improve check_advisories for formatting

We should add some formatting checks otherwise we wind up with issues like #135

  1. <code> is not allowed in title
  2. If a colon is present in title, the title must be in single quotes.
  3. An HTML tag (e.g. <dialog>) must not use a < but rather &lt;

It might be possible to use backticks instead of <code> tags also...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.