Apache bRPC 1.18.0 broadens protocol coverage and platform support, and significantly hardens parsers and transport internals against malformed or malicious input.
Features
- Add MySQL client protocol with clean-room auth, text protocol, transactions and prepared statements by @rajvarun77 (#3330)
- Support TLSv1.3 by @neilxxxxx (#3319)
- Support Protobuf v35 by @wasphin (#3429)
- Support flow-controlled gRPC client requests by @wasphin (#3430)
- Add TLS peer name verification for clients by @wwbmmm (#3408)
- Support checksumming the attachment together with the body by @yanglimingcn (#3407)
- Support RDMA handshake protocol V3 by @chenBright (#3350, #3326)
- Support end-to-end ECE negotiation in RDMA handshake V3 by @chenBright (#3352)
- Interconnect via UBShmTransport based on LD/ST shared-memory semantics by @zchuango (#3290)
- Add Power-of-Two-Choices Peak-EWMA (p2c) load balancer by @rajvarun77 (#3367)
- Add bounded-load consistent hashing (c_murmurhash_bl) load balancer by @rajvarun77 (#3502)
- Add IOBuf<->std::iostream adapters for zero-copy I/O by @chenBright (#3341)
- Add RISC-V Zvbc vector CRC32C acceleration by @Felix-Gong (#3332)
- Support LeakSanitizer by @chenBright (#3361)
Bugfixes
- Apply auth check to builtin requests on public port by @wwbmmm (#3308)
- Fix HPACK dynamic table size update recursive decoding by @wwbmmm (#3343)
- Fix inline redis protocol consuming HTTP/2 connection preface by @rajvarun77 (#3338)
- Fix HTTPS pooled client crash on unexpected SSL EOF by @Felix-Gong (#3316)
- Fix rpcz root client span lifetime by @lh2debug-2 (#3421)
- Bound SSL handshake to prevent leaked ESTABLISHED sockets by @yerixu (#3296)
- Fix static initialization order fiasco in AdaptiveMaxConcurrency by @Felix-Gong (#3315)
- Set socket buffer options before connect by @howzi (#3368)
- Guard SO_BINDTODEVICE by @daeho-ro (#3320)
- Fix race when falling back from RDMA to TCP by @legionxiong (#3406)
- Fix RDMA handshake failing the socket instead of falling back to TCP by @chenBright (#3424)
- Fix RDMA PollCq missing recv CQEs after re-arming the CQs by @chenBright (#3425)
- Fix data race on Socket::_read_buf of RDMA server by @chenBright (#3505)
- Fix late selective_channel retry after EndRPC by @hjwsm1989 (#3359)
- Fix StreamCreate failure handling by @ljcjclljc (#3357)
- Fix SetHostSocket when add stream failed by @lo-tk (#3386)
- Fix host_socket not set for extra streams on client side by @chenBright (#3373)
- Fix SelectiveChannel response copy for non-reflectable messages by @zchuango (#3514)
- Fix WeightedRandomizedLoadBalancer skipping the last server by @Nas01010101 (#3426)
- Refactor sharded priority queue with per-ED shard by @yannan-wyn (#3270)
- Fix bthread_interrupt was scheduled to the wrong tag group by @chenBright (#3351)
- Fix potential bvar deadlock by running describe()/dump() outside the global VarMap lock by @chenBright (#3470)
- Hide libunwind's Unwind* symbols under Bazel to fix bthread_tracer crash by @chenBright (#3297)
- Fix empty Redis command array parsing by @wwbmmm (#3354)
- Fix SOFA PBRPC parser not limiting metadata size by @wwbmmm (#3449)
- Fix bug when parsing zero-length string field in mcpack2pb by @wwbmmm (#3450)
- Fix RTMP abort message deleting the chunk stream being parsed by @wwbmmm (#3452)
- Fix streaming RPC frame validation by @wasphin (#3481)
- Fix out-of-bounds read parsing AVC SPS in ParseSPS by @ubeddulla (#3371)
- Fix char-signedness out-of-bounds read in url and header lookup tables by @ubeddulla (#3376)
- Fix use-after-free of the new block in SingleIOBuf::assign by @ubeddulla (#3397)
- Fix exp-golomb bit position in avc_nalu_read_uev by @ubeddulla (#3483)
- Bound exp-golomb suffix read to bitstream in avc_nalu_read_uev by @sahvx655-wq (#3334)
- Prevent leaked SocketMap references during Channel reinitialization by @darion-yaphet (#3433)
- Render /vars as an HTML name-value table by @darion-yaphet (#3413)
- Replace RISC-V cpu_relax fence.i with pause hint for spin-wait by @Felix-Gong (#3374)
- Release AccessThreadArgs array in parallel_http to avoid memory leak by @waterWang (#3491)
- Drop unimplemented barrier and rwlockattr APIs from bthread by @darion-yaphet (#3504)
Enhancements
- Enforce body size limits in protocol parsers by @wwbmmm (#3382)
- Bound wire-declared sizes and decompressed output during parsing by @wwbmmm (#3476)
- Harden HTTP/2 receive path against unbounded resource growth by @wwbmmm (#3474)
- Reject HTTP/1 header forms that desync framing, drop chunked trailers by @chenBright (#3521)
- Reject zero-length padded DATA frame in H2Context::OnData by @sahvx655-wq (#3325)
- Read GOAWAY fields before Additional Debug Data in OnGoAway by @ubeddulla (#3395)
- Size HPACK dynamic table for the 33-byte minimum entry by @ubeddulla (#3462)
- Avoid undefined shift in HPACK DecodeInteger on crafted integer by @ubeddulla (#3379)
- Skip header fields containing CR/LF in HTTP serialization by @ubeddulla (#3387)
- Cast to unsigned char in ctype calls on untrusted request bytes by @sahvx655-wq (#3335)
- Bounds-check OnUserControlMessage like sibling control handlers by @sahvx655-wq (#3329)
- Reject zero-datasize FLV tag in FlvReader::Read by @sahvx655-wq (#3366)
- Reject out-of-range port in SplitHostAndPort by @ubeddulla (#3434)
- Limit nested container depth in Redis reply and AMF parsers by @wwbmmm (#3344)
- Limit AMF string and array parsing by @wwbmmm (#3353)
- Limit Redis inline command allocation by @wwbmmm (#3363)
- Cap simple string length in RedisReply::ConsumePartialIOBuf by @ubeddulla (#3404)
- Guard negative value_size in memcache PopStore by @ubeddulla (#3392)
- Guard underflowed value size in couchbase collection responses by @ubeddulla (#3402)
- Check field length against remaining buffer in MySQL Field::Parse by @ubeddulla (#3381)
- Reject empty MySQL response packets by @wasphin (#3536)
- Limit mcpack2pb array item count to the actual payload size by @wwbmmm (#3451)
- Limit recursion depth of mcpack2pb parser by @wwbmmm (#3499)
- Contain malformed Thrift T_EXCEPTION replies on the client by @wwbmmm (#3500)
- Refactor streaming rpc by @chenBright (#3422)
- Validate returned stream identifiers by @wasphin (#3485)
- Limit reassembled stream message size by @wasphin (#3489)
- Limit streams accepted per request by @wasphin (#3493)
- Reject invalid stream feedback frames by @wasphin (#3494)
- Handle rejected RTMP streams on response failure by @wasphin (#3508)
- Release the RTMP peer key after key agreement by @wasphin (#3501)
- Preserve RTMP chunk stream state on abort by @wasphin (#3515)
- Reintroduce progressive HTTP read timeout support by @zchuango (#3469)
- Reimplement writer-priority rwlock by @chenBright (#3286)
- Support per-tag CPU affinity in --cpu_set by @yanglimingcn (#3331)
- Reclaim unscheduled timer tasks instead of holding slots until run_time by @stdpain (#3384)
- Signal workers for priority tasks by @chenBright (#3423)
- Convert ADD/SUB_TLS_PTHREAD_LOCK_COUNT macros to inline functions by @altman08 (#3394)
- Use BAIDU_GET_VOLATILE_THREAD_LOCAL to access tls_unique_user_ptr by @altman08 (#3393)
- Use macros for safer thread-local access on ARM by @altman08 (#3380)
- Implement lock-free AtomicInteger128 for RISC-V by @Felix-Gong (#3355)
- Make TaskControl metric ownership explicit by @darion-yaphet (#3490)
- Drain CQ after moving QP into RESET state by @live4thee (#3261)
- Optimize RDMA flags by @randomkang (#3300)
- Update butil::default_block_size when rdma_recv_block_type is set by @randomkang (#3303)
- Make Socket::_state atomic to prevent concurrent _read_buf mutation on TCP fallback by @chenBright (#3347)
- Reject stale CQ callbacks after socket revival by @legionxiong (#3412)
- Ignore stale input events on a Socket revived without an fd by @chenBright (#3510)
- Check chunk header bounds in ubring recv paths by @ubeddulla (#3497)
- Enforce internal_port gating of builtin services in pb protocols by @chenBright (#3511)
- Close two paths that reach services past their intended gate by @chenBright (#3512)
- Serve builtin services only on ServerOptions.internal_port by @chenBright (#3525)
- Freeze bvar dump path flags and cap pprof duration by FLAGS_max_profiling_seconds by @chenBright (#3523)
- Allow enabled_protocols to name http, h2 and rdma_handshake by @chenBright (#3518)
- Harden bvar sampling against UAF by @chenBright (#3487)
- Use thread local process id and thread id for logging by @chenBright (#3362)
- Replace popen('uname -ap') with uname() syscall in bvar kernel_version by @weim0000 (#3517)
- Use stream JSON api in protobuf v31+ by @chenBright (#3342)
- Optimize CRC32C for riscv64 with Zbc carry-less multiplication by @Felix-Gong (#3312)
- Optimize snappy UnalignedCopy64 and IncrementalCopy for RISC-V by @Felix-Gong (#3360)
- Add RISC-V Vector (RVV) optimized memcpy for IOBuf cp() by @Felix-Gong (#3375)
- Optimize base64 for riscv64 with RVV vrgather and vectorized decode by @Felix-Gong (#3388)
- Optimize StringPiece memcmp for RISC-V with RVV by @Felix-Gong (#3390)
- Optimize StringPiece::find(char) for RISC-V with RVV memchr by @Felix-Gong (#3396)
- cputime optimize for arm64 by @dwh110 (#3247)
- MySQL clean-room auth handshake codec (scramble + handshake + packet) by @rajvarun77 (#3310)
- Validate Discovery response object fields by @wasphin (#3533)
- Improve code quality and maintainability of UBShmTransport by @zchuango (#3471)
Others
- Fix UAF in SSLTest.connect_on_create by @chenBright (#3311)
- Fix UAF in batch_create_stream_feedback_race unittest by @chenBright (#3305)
- Fix hang in stream ID validation test by @wasphin (#3513)
- Fix stream count test cleanup by @wasphin (#3531)
- Fix unstable HPACK unittest by @wwbmmm (#3473)
- Remove noisy INFO log in ResetMaxSize and fix HPACK unittest instability by @wwbmmm (#3488)
- Prevent null dereference in fuzz test socket initialization by @Felix-Gong (#3314)
- Add boost shared_mutex style semantics tests for bthread_rwlock_t by @altman08 (#3496)
- Wait for asynchronous span collection in tests by @ZhengweiZhu (#3448)
- Avoid overriding the configured C++ standard in tests by @zchuango (#3446)
- Use -fno-access-control instead of -Dprivate=public for tests by @Felix-Gong (#3346)
- Bump brpc_channel_unittest to size=large to fix CI timeout flakiness by @rajvarun77 (#3339)
- Bring up redis-server and mysql-server for CI unittests by @rajvarun77 (#3323)
- Configure GitHub workflows to use concurrency cancel-in-progress by @apupier (#3333)
- Run Bazel tests in parallel in CI by @wasphin (#3482)
- Speed up CI with build caching and parallel jobs by @wasphin (#3486)
- Refactor Bazel build with custom proto rules and build all test targets by @chenBright (#3313)
- Complete UBRING Bazel and CI support by @ZhengweiZhu (#3445)
- Fix bazel compile error on macOS by @chenBright (#3364)
- Fix brpc_proto_library failure when brpc is used as an external Bazel dependency by @chenBright (#3427)
- Modernize target-scoped CMake configuration by @darion-yaphet (#3377)
- Extract shared CMake dependency helper for examples by @darion-yaphet (#3391)
- Prefer generated proto headers over in-source leftovers in CMake by @darion-yaphet (#3506)
- Align all builds on a C++14 baseline by @darion-yaphet (#3419)
- Clean up redundant warning sources in build by @darion-yaphet (#3385)
- Add threat model and security-model discoverability (AGENTS.md, SECURITY.md, THREAT_MODEL.md) by @potiuk (#3324)
- Add Bazel build guide and bzlmod example by @zchuango (#3468)
- Add Claude Code project guidance file by @darion-yaphet (#3369)
- Guide contributors through repository workflows in AGENTS.md by @darion-yaphet (#3370)
- Add StarRocks use case to community/cases.md by @ShawYann (#3478)
- Translate English bthread documentation by @darion-yaphet (#3503)
- Replace NULL with nullptr across the codebase (butil, bthread, json2pb, brpc, bvar, test, tools, example, docs) by @chenBright and @darion-yaphet (#3437, #3438, #3439, #3440, #3441, #3442, #3443, #3444, #3454, #3455, #3456, #3457, #3458, #3459, #3460, #3461, #3464, #3465, #3466, #3467, #3403)