alamb commented on code in PR #9730:
URL: https://github.com/apache/arrow-rs/pull/9730#discussion_r3121639156


##########
arrow/src/lib.rs:
##########
@@ -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);

Review Comment:
   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



##########
SECURITY.md:
##########
@@ -0,0 +1,49 @@
+<!---
+  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. For example, 
[`ArrayData::validate_full`] can be used to ensure that data conforms to the 
Arrow specification.
+
+## Rust Safety and Undefined Behavior

Review Comment:
   Done below



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to