-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Document Security Policy #9730
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
Document Security Policy #9730
Changes from 10 commits
d6f3a8f
8d0f20e
6b59892
fff1a96
de727be
69b5e99
316697f
62d8e14
2ab58f3
ed2c393
399898e
d2274c0
0e09ca6
1c9f736
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| <!--- | ||
| Licensed to the Apache Software Foundation (ASF) under one | ||
| or more contributor license agreements. See the NOTICE file | ||
| distributed with this work for additional information | ||
| regarding copyright ownership. The ASF licenses this file | ||
| to you under the Apache License, Version 2.0 (the | ||
| "License"); you may not use this file except in compliance | ||
| with the License. You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, | ||
| software distributed under the License is distributed on an | ||
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| KIND, either express or implied. See the License for the | ||
| specific language governing permissions and limitations | ||
| under the License. | ||
| --> | ||
|
|
||
| # Security Policy | ||
|
|
||
| This document outlines the security model for the Rust implementation of Apache Arrow (`arrow-rs`) and how to report vulnerabilities. | ||
|
|
||
| ## Security Model | ||
|
|
||
| The `arrow-rs` project follows the [Apache Arrow Security Model]. Key aspects include: | ||
|
|
||
| - Reading data from untrusted sources (e.g., over a network or from a file) requires explicit validation. | ||
| - Failure to validate untrusted data before use may lead to security issues. | ||
|
|
||
| This implementation provides APIs to validate Arrow data such as | ||
| [`ArrayData::validate_full`] to ensure that data conforms to the Arrow | ||
| specification. | ||
|
|
||
| Unexpected behavior (e.g., panics, crashes, or infinite loops) triggered by | ||
| malformed input is generally considered a **bug**, not a security | ||
| vulnerability, unless it is **exploitable** by an attacker to | ||
|
|
||
| * Execute arbitrary code (Remote Code Execution); | ||
| * Exfiltrate sensitive information from process memory (Information Disclosure); | ||
|
|
||
| Similarly, undefined behavior using safe APIs is considered a bug unless it can | ||
| be exploited as above. | ||
|
|
||
|
|
||
| ## Reporting Bugs | ||
|
|
||
| We treat all bugs seriously and welcome help fixing them. If you find a bug | ||
| that does not meet the criteria for a security vulnerability, please report it | ||
| in the public issue tracker so we can fix it together. | ||
|
|
||
| ## Reporting a Vulnerability | ||
|
|
||
| For security vulnerabilities, we ask that you follow the responsible disclosure | ||
| process outlined below. This allows us to investigate and fix the issue before | ||
| it can be exploited in the wild. | ||
|
|
||
| **Do not file a public issue.** Follow the [ASF security reporting process] by emailing [security@apache.org](mailto:security@apache.org). | ||
|
|
||
| Include in your report: | ||
| - A clear description and minimal reproducer. | ||
| - Affected crates and versions. | ||
| - Potential impact. | ||
|
|
||
| [Apache Arrow Security Model]: https://arrow.apache.org/docs/dev/format/Security.html | ||
| [`ArrayData::validate_full`]: https://docs.rs/arrow/latest/arrow/array/struct.ArrayData.html#method.validate_full | ||
| [ASF security reporting process]: https://www.apache.org/security/#reporting-a-vulnerability | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| <!--- | ||
| Licensed to the Apache Software Foundation (ASF) under one | ||
| or more contributor license agreements. See the NOTICE file | ||
| distributed with this work for additional information | ||
| regarding copyright ownership. The ASF licenses this file | ||
| to you under the Apache License, Version 2.0 (the | ||
| "License"); you may not use this file except in compliance | ||
| with the License. You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, | ||
| software distributed under the License is distributed on an | ||
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| KIND, either express or implied. See the License for the | ||
| specific language governing permissions and limitations | ||
| under the License. | ||
| --> | ||
|
|
||
| # `arrow-csv` | ||
|
|
||
| Support for reading and writing CSV files to and from [Apache Arrow]. | ||
|
|
||
| See the [main repository README] and the [API documentation] for more details. | ||
|
|
||
| ## Security | ||
|
|
||
| See the [Security Policy] for information on the security model and how to report vulnerabilities. | ||
|
|
||
| [Apache Arrow]: https://arrow.apache.org/ | ||
| [main repository README]: https://github.com/apache/arrow-rs | ||
| [API documentation]: https://docs.rs/arrow-csv/latest | ||
| [Security Policy]: https://github.com/apache/arrow-rs/blob/main/SECURITY.md |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| <!--- | ||
| Licensed to the Apache Software Foundation (ASF) under one | ||
| or more contributor license agreements. See the NOTICE file | ||
| distributed with this work for additional information | ||
| regarding copyright ownership. The ASF licenses this file | ||
| to you under the Apache License, Version 2.0 (the | ||
| "License"); you may not use this file except in compliance | ||
| with the License. You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, | ||
| software distributed under the License is distributed on an | ||
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| KIND, either express or implied. See the License for the | ||
| specific language governing permissions and limitations | ||
| under the License. | ||
| --> | ||
|
|
||
| # `arrow-ipc` | ||
|
|
||
| Support for reading and writing files and streams in the [Arrow IPC Format] to and from [Apache Arrow]. | ||
|
|
||
| See the [main repository README] and the [API documentation] for more details. | ||
|
|
||
| ## Security | ||
|
|
||
| See the [Security Policy] for information on the security model and how to report vulnerabilities. | ||
|
|
||
| [Apache Arrow]: https://arrow.apache.org/ | ||
| [Arrow IPC Format]: https://arrow.apache.org/docs/format/Columnar.html#format-ipc | ||
| [main repository README]: https://github.com/apache/arrow-rs | ||
| [API documentation]: https://docs.rs/arrow-ipc/latest | ||
| [Security Policy]: https://github.com/apache/arrow-rs/blob/main/SECURITY.md |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| <!--- | ||
| Licensed to the Apache Software Foundation (ASF) under one | ||
| or more contributor license agreements. See the NOTICE file | ||
| distributed with this work for additional information | ||
| regarding copyright ownership. The ASF licenses this file | ||
| to you under the Apache License, Version 2.0 (the | ||
| "License"); you may not use this file except in compliance | ||
| with the License. You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, | ||
| software distributed under the License is distributed on an | ||
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| KIND, either express or implied. See the License for the | ||
| specific language governing permissions and limitations | ||
| under the License. | ||
| --> | ||
|
|
||
| # `arrow-json` | ||
|
|
||
| Support for reading and writing JSON to and from [Apache Arrow]. | ||
|
|
||
| See the [main repository README] and the [API documentation] for more details. | ||
|
|
||
| ## Security | ||
|
|
||
| See the [Security Policy] for information on the security model and how to report vulnerabilities. | ||
|
|
||
| [Apache Arrow]: https://arrow.apache.org/ | ||
| [main repository README]: https://github.com/apache/arrow-rs | ||
| [API documentation]: https://docs.rs/arrow-json/latest | ||
| [Security Policy]: ../SECURITY.md |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -335,14 +335,28 @@ | |
| //! * [`parquet`](https://docs.rs/parquet) - support for [Apache Parquet] | ||
| //! * [`arrow-avro`](https://docs.rs/arrow-avro) - support for [Apache Avro] | ||
| //! | ||
| //! # Safety and Security | ||
| //! # Security | ||
| //! | ||
| //! Like many crates, this crate makes use of unsafe where prudent. However, it endeavours to be | ||
| //! sound. Specifically, **it should not be possible to trigger undefined behaviour using safe APIs.** | ||
| //! This project follows the [Apache Arrow Security Model]. | ||
| //! | ||
| //! If you think you have found an instance where this is possible, please file | ||
| //! a ticket in our [issue tracker] and it will be triaged and fixed. For more information on | ||
| //! arrow's use of unsafe, see [here](https://github.com/apache/arrow-rs/tree/main/arrow#safety). | ||
| //! Unexpected behavior (e.g., panics, crashes, or infinite loops) triggered by | ||
| //! malformed input is considered a **bug**, not a security vulnerability, | ||
| //! unless it is **exploitable** by an attacker to | ||
| //! | ||
| //! * Execute arbitrary code (Remote Code Execution); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added explicit definition of what exploitable means here. I did not include a "Denial Of Service" per the discussion with @tustvold on https://github.com/apache/arrow/pull/49761/changes#r3087975701 |
||
| //! * Exfiltrate sensitive information from process memory (Information Disclosure); | ||
| //! | ||
| //! If you think you have found a security vulnerability, please follow the | ||
| //! reporting instructions in the repository `SECURITY.md` file. | ||
| //! | ||
| //! # Safety | ||
| //! | ||
| //! Like many crates, this crate makes use of `unsafe` where prudent. However, it endeavors to be | ||
| //! sound. Specifically, **it should not be possible to trigger undefined behavior using safe APIs.** | ||
| //! | ||
| //! For more information on the use of unsafe, see [here](https://github.com/apache/arrow-rs/tree/main/arrow#safety). | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should a soundness issue be considered a security issue or not? I mainly ask as whilst we want to encourage reporting of soundness issues, they aren't in and of themselves exploitable.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suggest we treat them as a security "issue" but not treated as a security vulnerability that requires special reporting / alerting unless there is some evidence it can actually be exploited I tried to clarify this in the "security" part of arrow/README
I do agree this leaves some interpretation about what "exploitable by an attacker" really means but I think some level of interpretation is unavoidable for undefined behavior in principle (as it is undefined) I will add a note to the safety section referring to the security section to make this explicit
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added more explanation to SECURITY.md and left links to there |
||
| //! | ||
| //! [Apache Arrow Security Model]: https://arrow.apache.org/docs/dev/format/Security.html | ||
| //! | ||
| //! # Higher-level Processing | ||
| //! | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be nice to give an example of past bugs that indicate each, if there are any.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thankfully (?) I am not aware of any such bugs in arrow-rs so I don't have any to list
I had codex find past examples, and the ones it found are as follows, which are mostly old undefined behavior issues
BinaryArrayfromArrayDatadoes not perform bound checks on reading values #772BinaryArrayfromArrayDatadoes not perform bound checks on reading offsets #773GenericStringArrayfromArrayDatadoes not perform bound checks on reading offsets #776regexdependency #1874UnionArraysconstruction from ArrayData #1486BitmapLength Validation is Incorrect #1231GenericStringArray::from_iter_valuesif reported iterator upper bound is incorrect #1144