github apache/brpc 1.18.0
Apache bRPC 1.18.0

3 hours ago

Apache bRPC 1.18.0 broadens protocol coverage and platform support, and significantly hardens parsers and transport internals against malformed or malicious input.

Features

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

Don't miss a new brpc release

NewReleases is sending notifications on new releases.