Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package vlang for openSUSE:Factory checked in at 2026-11-23 15:45:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/vlang (Old) and /work/SRC/openSUSE:Factory/.vlang.new.1340718 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "vlang" Mon Nov 23 15:45:09 2026 rev:10 rq:1399942 version:0.5.2 Changes: -------- --- /work/SRC/openSUSE:Factory/vlang/vlang.changes 2026-09-07 11:34:12.309247262 +0200 +++ /work/SRC/openSUSE:Factory/.vlang.new.1340718/vlang.changes 2026-11-23 15:45:11.885951492 +0100 @@ -1,0 +2,21 @@ +Mon Nov 23 10:28:09 UTC 2026 - Ana Guerrero <[email protected]> + +- Update to use a versioned vendored markdown module instead + of tracking the master branch. + +------------------------------------------------------------------- +Sat Nov 14 00:00:00 UTC 2026 - Eyad Issa <[email protected]> + +- Accept mbedtls-devel version 3 under either distribution package + name, allowing dependency resolution on openSUSE Leap. + +------------------------------------------------------------------- +Fri Nov 13 00:00:00 UTC 2026 - Eyad Issa <[email protected]> + +- CVE-2026-82509: vlang: TLS certificate validation bypass allows + on-path attackers to intercept HTTPS traffic (bco#1290354). + Verify server certificates by default, including through HTTP + CONNECT and SOCKS proxies; validate: false explicitly opts out. + * 0007-verify-https-certificates-by-default.patch + +------------------------------------------------------------------- @@ -58 +79,2 @@ - libcjson via 0004-Fix-cJSON_GetErrorPos-undefined-reference.patch. + libcjson via + 0004-Fix-cJSON_GetErrorPos-undefined-reference.patch. @@ -63 +85,2 @@ - * Build intermediate stages without LTO to speed up bootstrapping. + * Build intermediate stages without LTO to speed up + bootstrapping. @@ -131 +154,2 @@ - * Improvents/fixes to Checker, Parser, Comptime, Compiler internals, + * Improvents/fixes to Checker, Parser, Comptime, Compiler + internals, @@ -134 +158,2 @@ -- See https://github.com/vlang/v/releases/tag/0.4.11 for full details +- Full details: + https://github.com/vlang/v/releases/tag/0.4.11 New: ---- 0007-verify-https-certificates-by-default.patch ----------(New B)---------- New: CONNECT and SOCKS proxies; validate: false explicitly opts out. * 0007-verify-https-certificates-by-default.patch ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ vlang.spec ++++++ --- /var/tmp/diff_new_pack.9XO6Up/_old 2026-11-23 15:45:13.398015499 +0100 +++ /var/tmp/diff_new_pack.9XO6Up/_new 2026-11-23 15:45:13.399015541 +0100 @@ -16,24 +16,24 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # -# git revision +# git revisions %global vc_gitrev bd654de8a3e275178908fe824d29f58c70baaae5 - +# vendored markdown module for vdoc +%global md_gitrev 55292d1aa5dc2ba79d53e3430306755a56d91b6b # custom paths and variables %global vflags -cc gcc -d dynamic_boehm -%global vexe_root %{_libexecdir}/%{name} -%global vexe %{vexe_root}/%{name} - Name: vlang Version: 0.5.2 Release: 0 +%global vexe_root %{_libexecdir}/%{name} +%global vexe %{vexe_root}/%{name} Summary: The V Programming Language License: MIT AND BSD-2-Clause URL: https://vlang.io/ Source0: https://github.com/%{name}/v/archive/%{version}/%{name}-%{version}.tar.gz Source1: https://github.com/%{name}/vc/raw/%{vc_gitrev}/v.c # Vdoc requires markdown module -Source2: https://github.com/vlang/markdown/archive/refs/heads/master.tar.gz#/markdown.tar.gz +Source2: https://github.com/vlang/markdown/archive/%{md_gitrev}/markdown-%{md_gitrev}.tar.gz#/markdown.tar.gz Source99: vlang-rpmlintrc Patch1: 0001-Link-to-distro-provided-mbedtls.patch Patch2: 0002-Disable-vdoc-testing.patch @@ -41,6 +41,7 @@ Patch4: 0004-Fix-cJSON_GetErrorPos-undefined-reference.patch Patch5: 0005-Force-system-libgc-on-Linux.patch Patch6: 0006-net-urllib-reject-backslashes.patch +Patch7: 0007-verify-https-certificates-by-default.patch BuildRequires: (c_compiler or gcc) BuildRequires: diffutils @@ -52,14 +53,14 @@ BuildRequires: pkgconfig(sqlite3) BuildRequires: pkgconfig(libcjson) BuildRequires: pkgconfig(libzstd) -BuildRequires: mbedtls-3-devel +BuildRequires: (mbedtls-devel >= 3 with mbedtls-devel < 4) # For vshare tool BuildRequires: pkgconfig(x11) Requires: pkgconfig(sqlite3) Requires: pkgconfig(bdw-gc) Requires: pkgconfig(libcjson) Requires: pkgconfig(libzstd) -Requires: mbedtls-3-devel +Requires: (mbedtls-devel >= 3 with mbedtls-devel < 4) %description V is a statically typed compiled programming language inspired ++++++ 0007-verify-https-certificates-by-default.patch ++++++ From: eris <[email protected]> Subject: Verify HTTPS server certificates by default Upstream: https://github.com/vlang/v/commit/40774847a949722f5d090706c050b806ceeacfd1 References: CVE-2026-82509 bsc#1290354 Backported to V 0.5.2; omit files introduced after this release. --- a/vlib/net/http/http.v +++ b/vlib/net/http/http.v @@ -29,7 +29,7 @@ read_timeout i64 = 30 * time.second // timeout for reading the response; applies to plain http and to direct https requests write_timeout i64 = 30 * time.second // timeout for writing the request; applies to plain http (write timeouts are not enforced on the SSL write path yet) - validate bool // set this to true, if you want to stop requests, when their certificates are found to be invalid + validate bool = true // abort on an invalid certificate; false skips it, except HTTP/3 which always verifies verify string // the path to a rootca.pem file, containing trusted CA certificate(s) cert string // the path to a cert.pem file, containing client certificate(s) for the request cert_key string // the path to a key.pem file, containing private keys for the client certificate(s) --- a/vlib/net/http/http_proxy.v +++ b/vlib/net/http/http_proxy.v @@ -162,7 +162,7 @@ s := req.build_request_headers_with(method, host_name, port, '${host.scheme}://${host_name}${port_part}${path}', data, header) if host.scheme == 'https' { - mut client := pr.ssl_dial('${host_name}:${port}')! + mut client := pr.ssl_dial('${host_name}:${port}', req)! $if windows { return error('Windows Not SUPPORTED') // TODO: windows ssl @@ -200,16 +200,23 @@ return pr.connect_tcp(host)! } -fn (pr &HttpProxy) ssl_dial(host string) !&ssl.SSLConn { +// request_ssl_connect_config copies the certificate fields a direct HTTPS dial sends. +// The proxy path must use this, or it accepts a certificate the direct dial rejects. +fn request_ssl_connect_config(req &Request) ssl.SSLConnectConfig { + return ssl.SSLConnectConfig{ + verify: req.verify + cert: req.cert + cert_key: req.cert_key + validate: req.validate + in_memory_verification: req.in_memory_verification + } +} + +fn (pr &HttpProxy) ssl_dial(host string, req &Request) !&ssl.SSLConn { + tls_config := request_ssl_connect_config(req) if pr.scheme in ['http', 'https'] { mut tcp := pr.connect_tcp(host)! - mut ssl_conn := ssl.new_ssl_conn( - verify: '' - cert: '' - cert_key: '' - validate: false - in_memory_verification: false - )! + mut ssl_conn := ssl.new_ssl_conn(tls_config)! ssl_conn.connect(mut tcp, host.all_before_last(':')) or { tcp.close() or {} return err @@ -217,7 +224,7 @@ ssl_conn.owns_socket = true return ssl_conn } else if pr.scheme == 'socks5' { - return socks.socks5_ssl_dial(pr.host, host, pr.username, pr.password)! + return socks.socks5_ssl_dial(pr.host, host, pr.username, pr.password, tls_config)! } else { return error('http_proxy ssl_dial: invalid proxy scheme') } --- a/vlib/net/http/http_proxy_test.v +++ b/vlib/net/http/http_proxy_test.v @@ -24,6 +24,30 @@ const proxy_https_test_key_path = @VEXEROOT + '/vlib/net/websocket/tests/autobahn/fuzzing_server_wss/config/server.key' +fn test_request_ssl_connect_config_copies_the_request_tls_fields() { + checking := Request{ + validate: true + verify: 'ca.pem' + cert: 'cert.pem' + cert_key: 'key.pem' + in_memory_verification: true + } + got := request_ssl_connect_config(checking) + assert got.validate + assert got.verify == 'ca.pem' + assert got.cert == 'cert.pem' + assert got.cert_key == 'key.pem' + assert got.in_memory_verification + skipped := request_ssl_connect_config(Request{ + validate: false + }) + assert !skipped.validate + assert skipped.verify == '' + assert skipped.cert == '' + assert skipped.cert_key == '' + assert !skipped.in_memory_verification +} + fn test_proxy_fields() ? { sample_proxy := new_http_proxy(sample_proxy_url)! sample_auth_proxy := new_http_proxy(sample_auth_proxy_url)! @@ -195,6 +219,88 @@ return .data } +// start_https_proxy_untrusted_target serves the autobahn cert for two attempts. +// A client that aborts the handshake makes accept fail; that attempt is skipped. +fn start_https_proxy_untrusted_target() !(int, chan bool) { + ready := chan int{cap: 1} + done := chan bool{cap: 1} + spawn fn [ready, done] () { + mut port_listener := net.listen_tcp(.ip, '127.0.0.1:0') or { panic(err) } + port := int((port_listener.addr() or { panic(err) }).port() or { panic(err) }) + port_listener.close() or {} + mut listener := mbedtls.new_ssl_listener('127.0.0.1:${port}', mbedtls.SSLConnectConfig{ + cert: proxy_https_test_cert_path + cert_key: proxy_https_test_key_path + validate: false + }) or { panic(err) } + ready <- port + defer { + listener.shutdown() or {} + done <- true + } + for _ in 0 .. 2 { + mut conn := listener.accept() or { continue } + handle_https_proxy_test_target_connection(mut conn) + } + }() + return <-ready, done +} + +// drain_https_proxy_test_accepts unblocks start_https_proxy_test_server, which +// accepts a fixed number of connections. A refused dial means the listener is done. +fn drain_https_proxy_test_accepts(proxy_port int) { + for _ in 0 .. proxy_https_request_count { + mut extra := net.dial_tcp('127.0.0.1:${proxy_port}') or { return } + extra.close() or {} + } +} + +fn test_https_proxy_default_validate_rejects_untrusted_certificate() ! { + $if tinyc { + // TinyCC hangs in the bundled mbedtls handshake path on linux CI. + return + } + target_port, target_done := start_https_proxy_untrusted_target()! + proxy_port, proxy_done := start_https_proxy_test_server(target_port)! + proxy := new_http_proxy('http://127.0.0.1:${proxy_port}')! + url := 'https://127.0.0.1:${target_port}/' + mut rejected := true + if _ := fetch( + method: .get + url: url + proxy: proxy + max_retries: 1 + ) { + rejected = false + } + accepted := fetch( + method: .get + url: url + proxy: proxy + validate: false + max_retries: 1 + ) or { + finish_https_proxy_certificate_test(proxy_port, target_port, proxy_done, target_done) + return err + } + finish_https_proxy_certificate_test(proxy_port, target_port, proxy_done, target_done) + assert rejected, 'default validate must reject the untrusted certificate' + assert accepted.status_code == 200 + assert accepted.body == 'ok' +} + +fn finish_https_proxy_certificate_test(proxy_port int, target_port int, proxy_done chan bool, target_done chan bool) { + drain_https_proxy_test_accepts(proxy_port) + // A rejected dial may not reach the target. Plain connects unblock a leftover + // accept. This is not a CA check: the autobahn cert has no IP SAN. + for _ in 0 .. 2 { + mut extra := net.dial_tcp('127.0.0.1:${target_port}') or { break } + extra.close() or {} + } + _ = <-target_done + _ = <-proxy_done +} + fn test_https_proxy_requests_do_not_leak_sockets() ! { $if windows { return --- a/vlib/net/http/request.v +++ b/vlib/net/http/request.v @@ -39,7 +39,7 @@ read_timeout i64 = 30 * time.second write_timeout i64 = 30 * time.second - validate bool // when true, certificate failures will stop further processing + validate bool = true // abort on an invalid certificate; false skips it, except HTTP/3 which always verifies verify string cert string cert_key string --- a/vlib/net/http/server_tls_test.v +++ b/vlib/net/http/server_tls_test.v @@ -100,6 +100,58 @@ assert resp.body == 'tls hello /hello' } +fn test_default_fetch_rejects_the_untrusted_server_certificate() { + assert http.FetchConfig{}.validate + assert http.Request{}.validate + $if use_openssl ? { + eprintln('skipping: TLS server not implemented for -d use_openssl yet') + return + } + port := pick_port() or { + assert false, 'pick_port: ${err}' + return + } + mut srv := &http.Server{ + addr: '127.0.0.1:${port}' + cert: server_tls_cert + cert_key: server_tls_key + in_memory_verification: true + accept_timeout: time.second + handler: EchoHandler{} + show_startup_message: false + } + t := spawn srv.listen_and_serve() + srv.wait_till_running() or { + srv.close() + t.wait() + assert false, 'server failed to start: ${err}' + return + } + defer { + srv.close() + t.wait() + } + time.sleep(50 * time.millisecond) + + // One attempt: a rejected certificate is an error, not a reason to retry the handshake. + if resp := http.fetch( + url: 'https://127.0.0.1:${port}/hello' + max_retries: 1 + ) { + assert false, 'untrusted certificate was accepted: ${resp.status_code} ${resp.body}' + return + } + resp := http.fetch( + url: 'https://127.0.0.1:${port}/hello' + validate: false + ) or { + assert false, 'fetch with the check skipped failed: ${err}' + return + } + assert resp.status_code == 200 + assert resp.body == 'tls hello /hello' +} + fn test_server_tls_stop() { $if use_openssl ? { eprintln('skipping: TLS server not implemented for -d use_openssl yet') --- a/vlib/net/mbedtls/mbedtls_concurrent_large_response_test.v +++ b/vlib/net/mbedtls/mbedtls_concurrent_large_response_test.v @@ -108,10 +108,17 @@ expected_body := concurrent_large_response_body() server := spawn serve_chunked_html_response(mut listener, expected_body) - body := http.get_text('https://127.0.0.1:${port}/chunked') + resp := http.fetch( + url: 'https://127.0.0.1:${port}/chunked' + validate: false + ) or { + server.wait() + assert false, 'fetch failed: ${err}' + return + } server.wait() - assert body == expected_body + assert resp.body == expected_body } fn concurrent_large_response_body() string { --- a/vlib/net/socks/socks5.v +++ b/vlib/net/socks/socks5.v @@ -23,15 +23,10 @@ return &socks_conn } -// socks5_ssl_dial create new instance of &ssl.SSLConn -pub fn socks5_ssl_dial(proxy_url string, host string, username string, password string) !&ssl.SSLConn { - mut ssl_conn := ssl.new_ssl_conn( - verify: '' - cert: '' - cert_key: '' - validate: false - in_memory_verification: false - )! +// socks5_ssl_dial dials `host` through the SOCKS5 proxy and wraps the socket in TLS. +// Omitting `config` accepts any server certificate; pass the caller's TLS fields to check it. +pub fn socks5_ssl_dial(proxy_url string, host string, username string, password string, config ssl.SSLConnectConfig) !&ssl.SSLConn { + mut ssl_conn := ssl.new_ssl_conn(config)! mut con := socks5_dial(proxy_url, host, username, password)! ssl_conn.connect(mut con, host.all_before_last(':')) or { con.close() or {} ++++++ markdown.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/markdown-master/renderer.v new/markdown-55292d1aa5dc2ba79d53e3430306755a56d91b6b/renderer.v --- old/markdown-master/renderer.v 2026-04-23 16:40:04.000000000 +0200 +++ new/markdown-55292d1aa5dc2ba79d53e3430306755a56d91b6b/renderer.v 2026-10-01 14:12:57.000000000 +0200 @@ -12,38 +12,29 @@ debug_log(msg string) } -fn renderer_handle_error(err IError) int { - ecode := err.code() - if ecode != 0 { - return ecode - } else { - return 1 - } -} - fn renderer_enter_block_cb(typ MD_BLOCKTYPE, detail voidptr, mut renderer Renderer) int { - renderer.enter_block(typ, detail) or { return renderer_handle_error(err) } + renderer.enter_block(typ, detail) or { return 1 } return 0 } fn renderer_leave_block_cb(typ MD_BLOCKTYPE, detail voidptr, mut renderer Renderer) int { - renderer.leave_block(typ, detail) or { return renderer_handle_error(err) } + renderer.leave_block(typ, detail) or { return 1 } return 0 } fn renderer_enter_span_cb(typ MD_SPANTYPE, detail voidptr, mut renderer Renderer) int { - renderer.enter_span(typ, detail) or { return renderer_handle_error(err) } + renderer.enter_span(typ, detail) or { return 1 } return 0 } fn renderer_leave_span_cb(typ MD_SPANTYPE, detail voidptr, mut renderer Renderer) int { - renderer.leave_span(typ, detail) or { return renderer_handle_error(err) } + renderer.leave_span(typ, detail) or { return 1 } return 0 } fn renderer_text_cb(typ MD_TEXTTYPE, text &char, size u32, mut renderer Renderer) int { s := unsafe { text.vstring_with_len(int(size)) } - renderer.text(typ, s) or { return renderer_handle_error(err) } + renderer.text(typ, s) or { return 1 } return 0 }
