From 12ff0e36e7711dec6b4f5ce0be42ffb71776c024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Galkin?= Date: Mon, 29 Dec 2025 12:50:06 -0300 Subject: [PATCH] Port: Bump up railguards for flatbuffer file size. (#1530) Some users have giganting snapshots with many nodes. This increases the risk of DoS attacks to services using IC. --- icechunk/src/format/manifest.rs | 2 +- icechunk/src/format/repo_info.rs | 2 +- icechunk/src/format/snapshot.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/icechunk/src/format/manifest.rs b/icechunk/src/format/manifest.rs index 44bcd52e6..9cfe0b2a2 100644 --- a/icechunk/src/format/manifest.rs +++ b/icechunk/src/format/manifest.rs @@ -627,7 +627,7 @@ fn mk_chunk_ref<'bldr>( static ROOT_OPTIONS: VerifierOptions = VerifierOptions { max_depth: 64, - max_tables: 50_000_000, + max_tables: 500_000_000, max_apparent_size: 1 << 31, // taken from the default ignore_missing_null_terminator: true, }; diff --git a/icechunk/src/format/repo_info.rs b/icechunk/src/format/repo_info.rs index 9aac54c47..1bbd7a78d 100644 --- a/icechunk/src/format/repo_info.rs +++ b/icechunk/src/format/repo_info.rs @@ -76,7 +76,7 @@ pub enum UpdateType { static ROOT_OPTIONS: VerifierOptions = VerifierOptions { max_depth: 10, - max_tables: 500_000, + max_tables: 5_000_000, max_apparent_size: 1 << 31, // taken from the default ignore_missing_null_terminator: true, }; diff --git a/icechunk/src/format/snapshot.rs b/icechunk/src/format/snapshot.rs index 0ce042057..0dfbd5856 100644 --- a/icechunk/src/format/snapshot.rs +++ b/icechunk/src/format/snapshot.rs @@ -337,7 +337,7 @@ impl SnapshotInfo { static ROOT_OPTIONS: VerifierOptions = VerifierOptions { max_depth: 64, - max_tables: 500_000, + max_tables: 50_000_000, max_apparent_size: 1 << 31, // taken from the default ignore_missing_null_terminator: true, };