Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CVE-2016-2545 and CVE-2022-28389 #223

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from
191 changes: 125 additions & 66 deletions cves/kernel/CVE-2016-2545.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ curated_instructions: |
This will enable additional editorial checks on this file to make sure you
fill everything out properly. If you are a student, we cannot accept your work
as finished unless curated is properly updated.
curation_level: 0
curation_level: 2
reported_instructions: |
What date was the vulnerability reported to the security team? Look at the
security bulletins and bug reports. It is not necessarily the same day that
the CVE was created. Leave blank if no date is given.

Please enter your date in YYYY-MM-DD format.
reported_date:
reported_date: '2016-01-12'
# I believe this is the report
# https://www.spinics.net/lists/alsa-devel/msg45082.html
announced_instructions: |
Was there a date that this vulnerability was announced to the world? You can
find this in changelogs, blogs, bug reports, or perhaps the CVE date.
Expand All @@ -38,7 +40,8 @@ announced_date: '2016-04-27'
published_instructions: |
Is there a published fix or patch date for this vulnerability?
Please enter your date in YYYY-MM-DD format.
published_date: '2016-04-27'
published_date: '2016-01-13'
# Based on git commit.
description_instructions: |
You can get an initial description from the CVE entry on cve.mitre.org. These
descriptions are a fine start, but they can be kind of jargony.
Expand All @@ -55,7 +58,19 @@ description_instructions: |

Your target audience is people just like you before you took any course in
security
description:
description: |
The snd_timer_interrupt function, part of the Linux kernel's sound subsystem,
handles sound timer interrupts. A specific linked list within this function
is improperly managed. Local users can exploit this by crafting a special
ioctl call, leading to a use-after-free vulnerability. A use-after-free
vulnerability occurs when memory is accessed after it has been freed, which
can lead to a variety of issues, including program crashes and unpredictable
behavior.

In this case, the exploitation leads to a race condition, a situation where
the system's behavior is dependent on the sequence or timing of other
uncontrollable events. This race condition can cause the system to crash,
resulting in a denial of service.
bounty_instructions: |
If you came across any indications that a bounty was paid out for this
vulnerability, fill it out here. Or correct it if the information already here
Expand All @@ -64,7 +79,7 @@ bounty:
amt:
announced:
url:
reviews: []
reviews: [ ]
bugs_instructions: |
What bugs are involved in this vulnerability?

Expand All @@ -75,7 +90,8 @@ bugs_instructions: |
* Mentioned in mailing list discussions
* References from NVD entry
* Various other places
bugs: []
bugs:
- https://bugzilla.redhat.com/show_bug.cgi?id=1311560
aisgbnok marked this conversation as resolved.
Show resolved Hide resolved
fixes_instructions: |
Please put the commit hash in "commit" below.

Expand All @@ -84,14 +100,8 @@ fixes_instructions: |

Place any notes you would like to make in the notes field.
fixes:
- commit:
note:
- commit:
note:
- commit: ee8413b01045c74340aa13ad5bdf905de32be736
note: |
Taken from NVD references list with Git commit. If you are
curating, please fact-check that this commit fixes the vulnerability and replace this comment with 'Manually confirmed'
- commit: ee8413b01045c74340aa13ad5bdf905de32be736
note: Manually Confirmed
vcc_instructions: |
The vulnerability-contributing commits.

Expand All @@ -105,16 +115,16 @@ vcc_instructions: |

Place any notes you would like to make in the notes field.
vccs:
- commit: 9244b2c3079faac79b3b961116bd548c45087e2c
note: Discovered automatically by archeogit.
- commit: 9244b2c3079faac79b3b961116bd548c45087e2c
note: Manually Confirmed
upvotes_instructions: |
For the first round, ignore this upvotes number.

For the second round of reviewing, you will be giving a certain amount of
upvotes to each vulnerability you see. Your peers will tell you how
interesting they think this vulnerability is, and you'll add that to the
upvotes score on your branch.
upvotes:
upvotes: 2
unit_tested:
question: |
Were automated unit tests involved in this vulnerability?
Expand All @@ -129,10 +139,10 @@ unit_tested:

For the fix_answer below, check if the fix for the vulnerability involves
adding or improving an automated test to ensure this doesn't happen again.
code:
code_answer:
fix:
fix_answer:
code: false
code_answer: No related unit tests could be found.
fix: false
fix_answer: No automated tests added.
discovered:
question: |
How was this vulnerability discovered?
Expand All @@ -147,10 +157,13 @@ discovered:

If there is no evidence as to how this vulnerability was found, then please
explain where you looked.
answer:
automated:
contest:
developer:
answer: |
This vulnerability was found by Dmitry Vyukov, a Google employee, by
utilizing Google's syzkaller fuzzer.
https://www.spinics.net/lists/alsa-devel/msg45082.html
automated: true
contest: false
developer: true
autodiscoverable:
instructions: |
Is it plausible that a fully automated tool could have discovered
Expand All @@ -167,8 +180,11 @@ autodiscoverable:

The answer field should be boolean. In answer_note, please explain
why you come to that conclusion.
note:
answer:
note: |
The vulnerability was discovered using Google's syzkaller fuzzer. This
demonstrates that it's not only possible, but proven, that automated tools
can be used to uncover similar vulnerabilities.
answer: true
specification:
instructions: |
Is there mention of a violation of a specification? For example, the POSIX
Expand All @@ -184,8 +200,10 @@ specification:

The answer field should be boolean. In answer_note, please explain
why you come to that conclusion.
note:
answer:
note: |
No related specification violations found in bug reports, kernel lore
discussions, commit messages, or mailing lists.
answer: false
subsystem:
question: |
What subsystems was the mistake in? These are WITHIN linux kernel
Expand Down Expand Up @@ -219,8 +237,10 @@ subsystem:
e.g.
name: ["subsystemA", "subsystemB"] # ok
name: subsystemA # also ok
name:
note:
name: sound
note: |
The vulnerability is in the timers abstract layer of the Advanced Linux
Sound Architecture (ALSA).
interesting_commits:
question: |
Are there any interesting commits between your VCC(s) and fix(es)?
Expand All @@ -235,10 +255,8 @@ interesting_commits:
* Other commits that fixed a similar issue as this vulnerability
* Anything else you find interesting.
commits:
- commit:
note:
- commit:
note:
- commit:
note:
i18n:
question: |
Was the feature impacted by this vulnerability about internationalization
Expand All @@ -251,8 +269,8 @@ i18n:
Answer should be true or false
Write a note about how you came to the conclusions you did, regardless of
what your answer was.
answer:
note:
answer: false
note: This relates to a linked list.
sandbox:
question: |
Did this vulnerability violate a sandboxing feature that the system
Expand All @@ -266,8 +284,10 @@ sandbox:
Answer should be true or false
Write a note about how you came to the conclusions you did, regardless of
what your answer was.
answer:
note:
answer: false
note: |
The vulnerability is a race condition in the snd_timer_interrupt function,
which is not related to sandboxing features.
ipc:
question: |
Did the feature that this vulnerability affected use inter-process
Expand All @@ -278,8 +298,15 @@ ipc:
Answer must be true or false.
Write a note about how you came to the conclusions you did, regardless of
what your answer was.
answer:
note:
answer: false
note: |
The snd_timer_interrupt function, a low-level timer interrupt, directly
interacts with hardware. Given its nature, it is highly unlikely
that it employs any form of userspace inter-process communication (IPC) such
as sockets, pipes, message queues, or shared memory. Therefore, any
potential IPC usage within the broader Advanced Linux Sound Architecture
(ALSA) system, which manages sound timers, would be unrelated to this
specific function.
discussion:
question: |
Was there any discussion surrounding this?
Expand All @@ -305,9 +332,14 @@ discussion:

Put any links to disagreements you found in the notes section, or any other
comment you want to make.
discussed_as_security:
any_discussion:
note:
discussed_as_security: false
any_discussion: true
note: |
While I don't believe this was explicitly discussed as a security issue,
it was discovered and discussed as a use-after-free memory vulnerability,
which does have security implications.
https://www.spinics.net/lists/alsa-devel/msg45082.html
https://lore.kernel.org/lkml/[email protected]/
vouch:
question: |
Was there any part of the fix that involved one person vouching for
Expand All @@ -320,8 +352,17 @@ vouch:

Answer must be true or false.
Write a note about how you came to the conclusions you did, regardless of what your answer was.
answer:
note:
answer: true
note: |
The patch commit itself was overseen by numerous employees from reputable
organizations. The vulnerability was discovered by Dmitry Vyukov, an
employee at Google, using the syzkaller fuzzer. The patch was subsequently
developed by Takashi Iwai from SUSE. Dmitry Vyukov then tested this patch.
The final sign-off on the patch was done by Ben Hutchings, a Debian
Developer.

Further examination of various discussions would likely reveal that this fix
was reviewed by an even larger number of individuals.
stacktrace:
question: |
Are there any stacktraces in the bug reports?
Expand All @@ -335,9 +376,12 @@ stacktrace:
Answer must be true or false.
Write a note about how you came to the conclusions you did, regardless of
what your answer was.
any_stacktraces:
stacktrace_with_fix:
note:
any_stacktraces: true
stacktrace_with_fix: true
note: |
The stacktrace in the bug report points to the file `sound/core/timer.c`
where the vulnerability resides and where the fix was applied.
https://www.spinics.net/lists/alsa-devel/msg45082.html
forgotten_check:
question: |
Does the fix for the vulnerability involve adding a forgotten check?
Expand All @@ -356,8 +400,10 @@ forgotten_check:
Answer must be true or false.
Write a note about how you came to the conclusions you did, regardless of
what your answer was.
answer:
note:
answer: false
note: |
The fix was to use a slightly different function variant for deleting
entries from the linked list. The fix did not include adding any checks.
order_of_operations:
question: |
Does the fix for the vulnerability involve correcting an order of
Expand All @@ -369,8 +415,10 @@ order_of_operations:
Answer must be true or false.
Write a note about how you came to the conclusions you did, regardless of
what your answer was.
answer:
note:
answer: false
note: |
The fix does not involve moving code around or changing the order of how
things are done.
lessons:
question: |
Are there any common lessons we have learned from class that apply to this
Expand Down Expand Up @@ -399,8 +447,10 @@ lessons:
applies:
note:
distrust_input:
applies:
note:
applies: true
note: |
The snd_timer_interrupt function lacks control over its input, leading to
a use-after-free vulnerability.
security_by_obscurity:
applies:
note:
Expand All @@ -411,8 +461,10 @@ lessons:
applies:
note:
secure_by_default:
applies:
note:
applies: true
note: |
A safer function list_del_init was available but was not used correctly
leading to the vulnerability.
yagni:
applies:
note:
Expand Down Expand Up @@ -448,13 +500,22 @@ mistakes:

Write a thoughtful entry here that people in the software engineering
industry would find interesting.
answer:
answer: |
The vulnerability in this case was caused by a lapse. The developers were
already using the safer function list_del_init in other parts of the code,
but they overlooked its use in this specific instance,leading to the
vulnerability.

The commit 9244b2c, referenced above, introduced a change in the list
handling from list_for_each to list_for_each_entry across the
Advanced Linux Sound Architecture (ALSA). However, the developers failed to
recognize that the list_del function needed to be replaced with
list_del_init to prevent this vulnerability.
CWE_instructions: |
Please go to http://cwe.mitre.org and find the most specific, appropriate CWE
Please go to https://cwe.mitre.org and find the most specific, appropriate CWE
entry that describes your vulnerability. We recommend going to
https://cwe.mitre.org/data/definitions/699.html for the Software Development
view of the vulnerabilities. We also recommend the tool
http://www.cwevis.org/viz to help see how the classifications work.
view of the vulnerabilities.

If you have anything to note about why you classified it this way, write
something in CWE_note. This field is optional.
Expand All @@ -465,13 +526,11 @@ CWE_instructions: |
CWE: [123, 456] # also ok
CWE: 123 # also ok
CWE:
- 362
CWE_note: |
CWE as registered in the NVD. If you are curating, check that this
is correct and replace this comment with "Manually confirmed".
- 362
CWE_note: Manually Confirmed
nickname_instructions: |
A catchy name for this vulnerability that would draw attention it.
If the report mentions a nickname, use that.
Must be under 30 characters. Optional.
nickname:
CVSS:
CVSS: CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Loading