[Bug] Gremlin sandbox blocks HStore gRPC allocator configuration reads
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
The report identifies HugeSecurityManager, GremlinGroovyScriptEngine.eval(), and gRPC Utils.getByteBufAllocator; it names no repository test file. Start by reviewing the linked fix in PR #3413 and its regression coverage for worker threads, allocator types, and script-denial checks. Done means the targeted internal property read works while direct script reads and unrelated property access remain denied; the pull request is already open.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug Type
Other exception / error: HStore access during Gremlin evaluation.
Environment
- Observed during HStore readiness on Linux/JDK17, with
HugeSecurityManagerenabled andgrpc-netty-shaded1.47.0. The graph had not been populated. - Independently reproduced against current master
f04d5cc8fc2fbd849d6aeef3f111e717a1f8f90d(1.8.0), using its actualgrpc-netty-shaded1.55.3 dependency,GremlinGroovyScriptEngine, and JVM security manager on Temurin 17.0.20.1/macOS aarch64.
Expected and actual behavior
A Gremlin query that reads HStore should be able to initialize an internal gRPC transport while script access to system properties remains restricted.
Instead, the first Gremlin read requiring a new transport fails with HTTP 500 and a gRPC channel panic:
java.lang.SecurityException: Not allowed to access system property(io.grpc.netty.shaded.io.grpc.netty.useCustomAllocator) via Gremlin
at org.apache.hugegraph.security.HugeSecurityManager.newSecurityException(...)
at org.apache.hugegraph.security.HugeSecurityManager.checkPropertyAccess(...)
at java.base/java.lang.System.getProperty(...)
at io.grpc.netty.shaded.io.grpc.netty.Utils.getByteBufAllocator(...)
io.grpc.StatusRuntimeException: INTERNAL: Panic! This is a bug!
Reproduction and cause
- Start a server backed by HStore with the existing security manager enabled.
- Submit a Gremlin read such as
g.V().limit(1).hasNext()that requires a new HStore gRPC transport. No large dataset or application schema is required. - Observe the allocator-property rejection above and the failed query.
Gremlin evaluation -> HStore scan -> new gRPC transport
-> Utils.getByteBufAllocator(boolean)
-> System.getProperty("io.grpc.netty.shaded.io.grpc.netty.useCustomAllocator", "true")
-> HugeSecurityManager rejects the internal read
The allocator reads this property on every invocation, so warming gRPC before Gremlin evaluation does not prevent the failure on later connections.
A focused regression also reproduces the rejection without starting a database or opening a connection: initialize the actual allocator, then invoke it through GremlinGroovyScriptEngine.eval() under HugeSecurityManager on a gremlin-server-exec-* or task-worker-* thread. Both worker paths fail on unmodified master. Calling CompiledScript.eval() directly is insufficient for this reproduction because it omits the engine stack frame used to identify Gremlin.
Proposed fix and verification boundary
Add this exact, non-sensitive boolean configuration flag to the existing property-read whitelist. Direct Gremlin script reads of this one flag are also permitted. Keep sensitive and unrelated property reads and bulk system-property enumeration denied; grant no wildcard access to the gRPC namespace. This avoids coupling production permission checks to a gRPC internal class or method name.
Fix PR: #3413. It includes actual-JAR regression coverage for both worker types and heap/direct allocators, permitted direct flag reads, and the remaining script-denial checks. The exact policy is documented in docs/server-runtime.md. This component reproduction does not establish full distributed HStore integration or benchmark acceptance.
Searched existing issues and PRs for the property and HStore/security-manager failures. Related #3214 concerns denied worker creation during ordered scans; this failure concerns an internal allocator-property read.
- Ngôn ngữ chính
- Java
- Star
- 3.2k
- Fork
- 642
- Merge trung bình
- 1 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 116
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/hugegraph
-
[Bug] PD task REST: balanceLeaders throws a bare HTTP 500 during the balance-shard window, and task responses cannot be told apart from a no-op or a follower answerCó thể đã có người làm @pallavithegod đã nhận 9 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
apache/hugegraph#3231 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] Store dedup iterators drop rows at query batch boundariesCó thể đã có người làm @vaidikgarg-bit đã nhận 1 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] PD TTL cleanup deletes the marker-shaped name instead of the expired key, so expired values stay in the store until readCó thể đã có người làm @bitflicker64 đã nhận 8 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của apache/hugegraph
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
quarkiverse/quarkus-google-cloud-services#1188 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Component: Frontend Component: Web Component Type: Maintenance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
it-at-m/refarch-templates#1944 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
priority: p2 type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
googleapis/java-genai#1372 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100
-
GeoSeries scale and skew tests fail with pytest 9.2.0Có thể đã có người làm @jiayuasu đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày