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

arrow BinaryArray advisory #1057

Merged
merged 3 commits into from
Sep 29, 2021
Merged

arrow BinaryArray advisory #1057

merged 3 commits into from
Sep 29, 2021

Conversation

Shnatsel
Copy link
Member

@Shnatsel Shnatsel commented Sep 25, 2021

Add an advisory for apache/arrow-rs#772 and apache/arrow-rs#773

@jorgecarleitao I'd appreciate if you could take a look.

@Shnatsel Shnatsel changed the title arrow BinaryArray advisory #1 arrow BinaryArray advisory Sep 25, 2021
@Shnatsel
Copy link
Member Author

I believe BinaryArray is mutable, so I've adjusted the wording to include writes and not just reads.

@jorgecarleitao
Copy link
Contributor

I believe BinaryArray is mutable, so I've adjusted the wording to include writes and not just reads.

How have you reached this? I think it does not expose any mutability. If it does, we have a data race problem. Arrays in arrow are expected to be immutable (under the indirection: BinaryArray -> ArrayData -> Arc<Buffer> -> Bytes(*const u8)).

@Shnatsel Shnatsel merged commit 9cc82e1 into main Sep 29, 2021
@Shnatsel Shnatsel deleted the arrow-binary-array branch September 29, 2021 15:46
@alamb
Copy link
Contributor

alamb commented Sep 29, 2021

@Shnatsel -- I wonder how did you decide to include this specific issue (and not, for example, the other items that are in the repo https://github.com/apache/arrow-rs/labels/security)?

@Shnatsel
Copy link
Member Author

@alamb I simply didn't get around to the other items yet. PRs are welcome.

@alamb
Copy link
Contributor

alamb commented Sep 29, 2021

@alamb I simply didn't get around to the other items yet. PRs are welcome.

I think a heads up to the arrow developer community would be appropriate before flagging these as vulnerabilities, to be honest. I'll write an email

@Shnatsel
Copy link
Member Author

That's fair. I usually post a comment on the relevant issue when a RustSec advisory is filed; I have unfortunately missed it this time.

That said, I believe the Arrow maintainers were at least aware of the issues. The issue reports demonstrating buffer overflows in safe code have been up on Github for over 2 weeks now, so creation of security advisories for them should not come as a surprise.

@tarcieri
Copy link
Member

tarcieri commented Sep 29, 2021

Responding to this comment from that mailing list in particular:

The criteria used for adding the arrow issues to the RUSTSEC database is not clear to me

This vulnerability appears to fall under CWE-125: Out-of-bounds Read.

That particular vulnerability class is #3 in the 2021 CWE Top 25 Most Dangerous Software Weaknesses.

@alamb
Copy link
Contributor

alamb commented Sep 29, 2021

I guess I was mostly confused about the timing of the addition :) Nothing like a bit of more public shaming to spur some action.

(disclosure I am one of the arrow-rs maintainers -- we'll get them fixed)

@alamb
Copy link
Contributor

alamb commented Sep 29, 2021

BTW I would suggest in the future doing the process proposed by @Shnatsel above and at least commenting on the ticket that is about to get a RUSTSEC entry so that the affected community has some advanced warning.

Thank you for your work in maintaining this database

@Shnatsel
Copy link
Member Author

Regarding the inclusion criteria, anything that violates the soundness principle defined in the Rustonomicon is a memory safety issue and should get an advisory.

In practical terms, if there is a piece of safe Rust code fails either any of the sanitizers or miri, it violates the soundness principle.

@alamb
Copy link
Contributor

alamb commented Sep 29, 2021

I agree with the principles -- thank you for the clarifications. I do suggest improving the communication around including a project's issues in RUSTSEC to include a bit of advanced warning for project developers.

Thanks again

@Shnatsel
Copy link
Member Author

I agree the communication can be improved. Would you be open to discussing this in more detail in a few days from now?

@alamb
Copy link
Contributor

alamb commented Sep 29, 2021

I agree the communication can be improved. Would you be open to discussing this in more detail in a few days from now?

I would be happy to

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

Successfully merging this pull request may close these issues.

4 participants