IPv6 bootstrap string triggers ASAN check
Description
Environment
Gerrit Reviews
Release Notes Description
Activity

CB robot March 28, 2024 at 5:46 AM
Build couchbase-server-7.2.5-7575 contains libcouchbase commit c4324a5 with commit message:
https://couchbasecloud.atlassian.net/browse/CCBC-1599#icft=CCBC-1599: account NUL-byte when format IPv6 address

CB robot December 19, 2023 at 1:39 AM
Build couchbase-server-7.1.6-3969 contains libcouchbase commit c4324a5 with commit message:
https://couchbasecloud.atlassian.net/browse/CCBC-1599#icft=CCBC-1599: account NUL-byte when format IPv6 address

CB robot August 31, 2023 at 8:45 AM
Build capella-analytics-1.0.0-1006 contains libcouchbase commit c4324a5 with commit message:
https://couchbasecloud.atlassian.net/browse/CCBC-1599#icft=CCBC-1599: account NUL-byte when format IPv6 address

CB robot August 31, 2023 at 7:35 AM
Build couchbase-server-7.6.0-1438 contains libcouchbase commit c4324a5 with commit message:
https://couchbasecloud.atlassian.net/browse/CCBC-1599#icft=CCBC-1599: account NUL-byte when format IPv6 address

CB robot August 23, 2023 at 3:01 PM
Build couchbase-server-8.0.0-1384 contains libcouchbase commit c4324a5 with commit message:
https://couchbasecloud.atlassian.net/browse/CCBC-1599#icft=CCBC-1599: account NUL-byte when format IPv6 address
Reproduction:
cbc get -U couchbase://::1/default?ipv6=allow foo
Heap-buffer-overflow on address 0x602000018535 at pc 0x00000045351d bp 0x7ffd83d06a10 sp 0x7ffd83d061d8 READ of size 6 at 0x602000018535 thread T0 at 0x45351c strlen at 0x7fa9482dd762 replace_hoststr (vbucket.c:786) at 0x7fa9482dd47d lcbvb_replace_host (vbucket.c:824) at 0x7fa948384e2c CccpProvider::update(char const*, char const*) (bc_cccp.cc:226) at 0x7fa948386fce CccpProvider::on_io_read() (bc_cccp.cc:431) at 0x7fa948387d90 io_read_handler(lcbio_CTX*, unsigned int) (bc_cccp.cc:378) at 0x7fa948330ffd invoke_read_cb(lcbio_CTX*, unsigned int) (ctx.cc:251) at 0x7fa9483304dd E_handler(int, short, void*) (ctx.cc:278) at 0x7fa9482cea42 run_loop (plugin-select.c:309) at 0x7fa9482ccf6f sel_run_loop (plugin-select.c:318) at 0x7fa9485fa5e7 lcb_wait (wait.cc:108) at 0x58ff2b cbc::Handler::run() (cbc.cc:764) at 0x5906f8 cbc::GetHandler::run() (cbc.cc:810) at 0x58f8db cbc::Handler::execute(int, char**) (cbc.cc:737) at 0x5b7707 main (cbc.cc:2547) at 0x7fa947649b49 __libc_start_call_main at 0x7fa947649c0a __libc_start_main@GLIBC_2.2.5 at 0x43cb84 _start Allocated by thread T0 here: at 0x4d790c __interceptor_calloc at 0x7fa9482dd1af lcbvb_replace_host (vbucket.c:807) at 0x7fa948384e2c CccpProvider::update(char const*, char const*) (bc_cccp.cc:226) at 0x7fa948386fce CccpProvider::on_io_read() (bc_cccp.cc:431) at 0x7fa948387d90 io_read_handler(lcbio_CTX*, unsigned int) (bc_cccp.cc:378) at 0x7fa948330ffd invoke_read_cb(lcbio_CTX*, unsigned int) (ctx.cc:251) at 0x7fa9483304dd E_handler(int, short, void*) (ctx.cc:278) at 0x7fa9482cea42 run_loop (plugin-select.c:309) at 0x7fa9482ccf6f sel_run_loop (plugin-select.c:318) at 0x7fa9485fa5e7 lcb_wait (wait.cc:108) at 0x58ff2b cbc::Handler::run() (cbc.cc:764) at 0x5906f8 cbc::GetHandler::run() (cbc.cc:810) at 0x58f8db cbc::Handler::execute(int, char**) (cbc.cc:737) at 0x5b7707 main (cbc.cc:2547) at 0x7fa947649b49 __libc_start_call_main at 0x7fa947649c0a __libc_start_main@GLIBC_2.2.5 at 0x43cb84 _start