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-2015-5366 and CVE-2016-2184 #213

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

Borna5356
Copy link

CVE-2015-5366 : This is a vulnerability that affects the UDP stack and can cause a Denial of Service.

CVE-2016-2184: This is a vulnerability that is impacts the USB audio connection causing a null pointer error resulting in a Denial of Service.

@@ -56,6 +56,10 @@ description_instructions: |
Your target audience is people just like you before you took any course in
security
description:
The create_fixed_stream_quirk funcrtion in sound/usb/quirks.c in the snd-usb-audio
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you meant function not funcrtion.

Copy link

@jym2584 jym2584 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CVE-2016-2184: 2 upvotes. I think it's interesting to learn more about hardware vulnerabilities that affect the linux kernel
CVE-2015-5366: 1 upvote. Interesting read for passing in the incorrect checksum. I remember encountering a similar issue before during my internship which ran incorrect file integrity checks

@@ -225,7 +238,7 @@ subsystem:
e.g.
name: ["subsystemA", "subsystemB"] # ok
name: subsystemA # also ok
name:
name: This bug affect the net subsystem
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would replace this with ["net", "subsystem"] to adhere to the required syntax

note:
This is because the on the commit message fixing the bug it was signed off bu both Eric Dumazet and
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo (by)
I think it would also be good to provide a source

@@ -55,7 +55,10 @@ description_instructions: |

Your target audience is people just like you before you took any course in
security
description:
description:
The udp_revmsg and udpv6_recvmsg functions in the linuz kernel that provide
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

linux*

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the description would be better clarified since the issues described in the git diff and patch notes could lead to a denial of service by causing an EPOLLET epoll application read outage when there's an incorrect checksum in a UDP packet.

developer:
answer:
The vulnerability was found in a twitter message where the security team was
contacted to create the CVE,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you able to link the twitter message?

note:
This vulnerability directly affected UDP connection as it was interuptin the
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interrupting

@@ -312,8 +338,11 @@ discussion:
Put any links to disagreements you found in the notes section, or any other
comment you want to make.
discussed_as_security:
The discussion is talking about the security risk of the invalid checksum and
what threath it is to the system
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

threat

developer:
autodiscoverable:
answer:
The bug was found using the USB-fuzzing frramework from SergeJ Shumilo. This
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

framework

@@ -223,7 +240,7 @@ subsystem:
e.g.
name: ["subsystemA", "subsystemB"] # ok
name: subsystemA # also ok
name:
name: The subsystem that the bug was apart of was the sound subsystem
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should just be sound

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I second this.

Copy link
Contributor

@andymeneely andymeneely left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you had the same mistake 28x lol. Should be an easy fix to get the yaml parsing. If you've cloned locally, I recommend using the YAML extension for VS Code to find your syntax errors. Well done, though!

description:
description:
The udp_revmsg and udpv6_recvmsg functions in the linuz kernel that provide
inappropriate EAGAIN return values. This allows attackers to perform a DOS via
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure you indent this text - that's probably why the yaml is broken

Comment on lines 142 to 144
code_answer:
Returns -EAGAIN to the application even if recieve queue is not empty.
This breaks the application using edge trigger epoll()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
code_answer:
Returns -EAGAIN to the application even if recieve queue is not empty.
This breaks the application using edge trigger epoll()
code_answer: |
Returns -EAGAIN to the application even if recieve queue is not empty.
This breaks the application using edge trigger epoll()

Comment on lines 161 to 163
answer:
The vulnerability was found in a twitter message where the security team was
contacted to create the CVE,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
answer:
The vulnerability was found in a twitter message where the security team was
contacted to create the CVE,
answer: |
The vulnerability was found in a twitter message where the security team was
contacted to create the CVE,

Comment on lines 183 to 187
note:
The reason why this bug can be discovered automatically is because the
bug causes a DOS attack because it causes an infinite loop making it so
that users can't get acces to the data. This can be tested automatically
by tesitng edge cases for return values.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
note:
The reason why this bug can be discovered automatically is because the
bug causes a DOS attack because it causes an infinite loop making it so
that users can't get acces to the data. This can be tested automatically
by tesitng edge cases for return values.
note: |
The reason why this bug can be discovered automatically is because the
bug causes a DOS attack because it causes an infinite loop making it so
that users can't get acces to the data. This can be tested automatically
by tesitng edge cases for return values.

Comment on lines 204 to 206
note:
there was no violation of a specification as the bug appeared from not
properly checking and validating the result before returning it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
note:
there was no violation of a specification as the bug appeared from not
properly checking and validating the result before returning it.
note: |
there was no violation of a specification as the bug appeared from not
properly checking and validating the result before returning it.

Comment on lines 293 to 295
note:
This is because the user might not be able to connect to the application
via USB and be able to use the audio.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
note:
This is because the user might not be able to connect to the application
via USB and be able to use the audio.
note: |
This is because the user might not be able to connect to the application
via USB and be able to use the audio.

Comment on lines 307 to 308
note:
This is because the bug impacts the usb connection which transfers data using packets
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
note:
This is because the bug impacts the usb connection which transfers data using packets
note: |
This is because the bug impacts the usb connection which transfers data using packets

Comment on lines 404 to 406
note:
The only fix that was needed was to make sure that there were more than
one endpoints.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
note:
The only fix that was needed was to make sure that there were more than
one endpoints.
note: |
The only fix that was needed was to make sure that there were more than
one endpoints.

Comment on lines 445 to 446
note: The reason the error was happening was because there was nothing checking
the endpoint value
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
note: The reason the error was happening was because there was nothing checking
the endpoint value
note: |
The reason the error was happening was because there was nothing checking the
endpoint value

Comment on lines 485 to 488
answer:
The main mistake that was made in this application was not sanitizng
the inputs to check and see if there was moe than one endpoint connected
via USB
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
answer:
The main mistake that was made in this application was not sanitizng
the inputs to check and see if there was moe than one endpoint connected
via USB
answer: |
The main mistake that was made in this application was not sanitizng
the inputs to check and see if there was moe than one endpoint connected
via USB

The create_fixed_stream_quirk function in sound/usb/quirks.c in the snd-usb-audio
driver in the Linux kernel before 4.5.1 allows physicaaly prximate attackers to
cause a DOS (NULL pointer dereference or double free and system crash) via a
crafted endpoints value in a USB device descriptor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just the CVE description. The instructions say to remove references to versions, specific filenames, and other jargon, and explain it in your own words, so I would suggest rewriting this section.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also if I am interpreting this correctly, is the idea that you could craft a USB sound device that consistently crashes the computer when you plug it in? If so that's a pretty neat vulnerability. Leans into the side-channel attacks we talked about in class.

@@ -75,7 +79,7 @@ bugs_instructions: |
* Mentioned in mailing list discussions
* References from NVD entry
* Various other places
bugs: []
bugs: [971125]
Copy link

@nolan-white nolan-white Nov 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This didn't work when I tried to access it via https://bugzilla.kernel.org/show_bug.cgi?id=971125. Was this perhaps on Red Hat's or another distribution's bugzilla.

create_fixed_stream_quirk() may cause a NULL-pointer dereference by
accessing the non-existing endpoint when a USB device with a malformed USB
descriptor is used. This patch avoids it simply by adding a sanity check of
bNumEndpoints before the accesses.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably shouldn't reference specific functions and variable names, but instead describe them at a higher-level for the reader.

fix:
fix_answer:
The fix was adding a check to make sure that the number of endpoints was
greater than 1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix is missing its Boolean value. Also the notes in this section should describe if unit tests existed for this code before and after the fix, not the fix itself.

autodiscoverable:
answer:
The bug was found using the USB-fuzzing frramework from SergeJ Shumilo. This
found out that the crash was caused by a zero value for bNumEndpoints.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in "frramework". Also I would suggest replacing the variable name with a high-level description of what that variable represents.

@@ -189,7 +205,9 @@ specification:
The answer field should be boolean. In answer_note, please explain
why you come to that conclusion.
note:
answer:
This is because the application does not check for endpoints which is
a very realistic possiblity that can occur.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is asking about a specific specification being violated. Are you referring to a particular specification here?

answer: false
note:
This bug does not affect internationalization as it only impacts
being able to connect to USB devices

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing period at end of sentence.

@@ -282,8 +304,9 @@ 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:
answer: ture

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in "ture".

note:
This is because the bug impacts the usb connection which transfers data using packets

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"usb" should be "USB". Also missing period at end of sentence.

note:
There was a message sent explaing the details of the bug that included a

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in "explaing".

@@ -453,6 +485,9 @@ mistakes:
Write a thoughtful entry here that people in the software engineering
industry would find interesting.
answer:
The main mistake that was made in this application was not sanitizng
the inputs to check and see if there was moe than one endpoint connected
via USB

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in "sanitizng". Also missing period at end of sentence.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7 upvotes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants