From patchwork Thu Dec 3 11:13:55 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Tyagi X-Patchwork-Id: 107183 Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.11887.1796296727729871124 for ; Thu, 03 Dec 2026 03:18:47 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20260707 header.b=FuRZWINl; spf=pass (domain: gmail.com, ip: 209.85.216.47, mailfrom: ankur.tyagi85@gmail.com) Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-3ac78f4c10bso6200342a91.1 for ; Thu, 03 Dec 2026 03:18:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796296727; x=1796901527; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=ohYX4Y90SU6qnYXienMRdbwtI+U4EJE7q5Im7FG2YVw=; b=FuRZWINl2xBzNtvKjmSXwxiH9b6lk8fxMKqCbkSP1PGB3YNygm6iCCxtVniorvLJmw WlF9WwTCC2RVO6GcAYMrJbSqeUsqCuREcgoKvvvlRCi45i4WCYmBNcVGkseCYU95pcDn y6cFGOV1gmV230IBseatc1DS7N3LZ3OKdHUB916JzSDd77nLtuUrJCHjHnLSSBeD1OSJ zqsvMucMYU+QW8jWs/DORvF1o2DUkmyrzlF0EfLPMd626a5dPzvVitpn6qHKjyIHQPqU DoILAsPS9CX8dNgco8QAZP4UNr7BYoj7lYaKH91Va3JwTCftJKa+J+dbojtGV2Bdm8Mu Lzuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796296727; x=1796901527; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=ohYX4Y90SU6qnYXienMRdbwtI+U4EJE7q5Im7FG2YVw=; b=ijwhdLCr7+uYmQD1l0RubVd6xVnrrKMyn35VYNCkF73urs9t+6Y3YKnppgfuiydSfL mE3ZTFVY6LgBWjsVP8HXjAW1BQAQsjh+AkeR2lPhJCrRAMNrPWaP9TCTV8G9zeEc3LoA i31zL7ON7Z7rmgJ3dDiRxu+VBOfaCTrLeMTqPvLDX4vMg4HNnx9aeq/gChftK4cfwTzq bx7OaRf9xi7++ZhQrvQrdmlc7dZGaGqhkIfQ6bH8KLXjp4NpvKU1x1EnuNSWQImLOQDm xQjlWqA4iK50oaCSFjPUa35H9KKdqG4bN2G7IwAxoAseN7T31k8vvURd2I7/pylUXUEC Oubg== X-Gm-Message-State: APuU4Z98fCQ4mwNpggGzreWCdm2L+O5lDlEvb45342fzuQyqRn2zLC5R HdxPIiGDAdnwW37eZCfU1Q8EQSG0qdS2z7vVio5DV9D4ODZq6VAFK6lxkiAGt6FR X-Gm-Gg: AZFdTZfwZIWVa6Z3AgyTWVR+5EehGi73KbidVTz+AXjpxGyP5nDZxVofqQzTo5saj21 8WM/Q9AixEaRHRXkzLZFCZOPtSitXTZscvnkUUUkJjW5Xltv+40S4YNWDvgVVFMmGlhUolfSGro 4SmuLqubaJiUVO5fjedqtK2jOq9avemTZskAhFDiM82YTgthWy38mlGLInb9yrnpNEByVZBVuA5 APl3e+8fbGY76vRh9luwAngbvhn8HbYD5w+MTIBPo4Sx1FbnT62KWIeKkMyMyPn9nei8uprQWgS iMlOTgf3wduGJdTIGH5RJ7MvyGWfzJ4ye6jAlqu+XhHod6FAoraBGgMYJIhsgRuRaEZeGQT/KRh CddGksmiot7R6k14AEWIbywR1k3AFjDFDc9CBxoBSgDUVkNT3yc6+2lYy8Lz8oMKbje774LrMqb yTAHjTNtsWnyATFgNa2F7x2eQTaIEZAdv7ysb6myFn58EA2WDokhx5dVPyQB7Ds9VDMj9YoffXx xclQ3xA+Tf+1AvVbsFDBwJiWj+daFb1oRbg3s13QNgxWlwGRhsfYpKvIV5cqdqH+ku332XKFFr7 NkdUvLNQ5kZiwf6W0n2DbsYRhcOrG+71Adh+AGGKxqt1u5/WMhRB1S8DNxnIwQg2VKfhTonZKQf 6zo+BGBJbgCiQz/+dP1o6eg== X-Received: by 2002:a17:90b:3d92:b0:3b1:2237:3c93 with SMTP id 98e67ed59e1d1-3b41c8de8d7mr38981870a91.18.1796296727040; Thu, 03 Dec 2026 03:18:47 -0800 (PST) Return-Path: Received: from NVAPF55DW0D-IPD.. ([147.161.219.8]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b5c7d65b94sm3890436a91.12.2026.12.03.03.18.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 03:18:46 -0800 (PST) From: ankur.tyagi85@gmail.com To: openembedded-devel@lists.openembedded.org Cc: Alex Kiernan , Khem Raj , Ankur Tyagi Subject: [oe][meta-oe][blacksail][PATCH 84/95] neatvnc: backport the nettle 4 port and its fixes Date: Fri, 4 Dec 2026 00:13:55 +1300 Message-ID: <20261203111406.4182597-84-ankur.tyagi85@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261203111406.4182597-1-ankur.tyagi85@gmail.com> References: <20261203111406.4182597-1-ankur.tyagi85@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Thu, 03 Dec 2026 11:18:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/133974 From: Alex Kiernan neatvnc 1.0.4's nettle backend does not build against nettle 4.0, which oe-core now has. Upstream has ported it, and fixed two crashes the port introduced: the WebSocket handshake passed the hash size where the hash type belongs (a SIGSEGV on every connection), and nettle 4 aborts the Apple Diffie-Hellman login because base16_decode_update() now takes the output buffer's size. None of this is in a release yet. AI-Generated: Claude Opus 5.5 (Claude Code) Signed-off-by: Alex Kiernan Signed-off-by: Khem Raj (cherry picked from commit b9050654ddd2441f582b9fe9b1a8dae587e6491c) Signed-off-by: Ankur Tyagi --- .../0001-Use-nettle-hogweed-version-4.patch | 83 +++++++++ ...pto-Remove-hash-digest-size-argument.patch | 160 ++++++++++++++++++ ...ake-Fix-crypto_hash_many-argument-mi.patch | 27 +++ ...ypto-fix-base16-decode-buffer-length.patch | 29 ++++ .../recipes-graphics/neatvnc/neatvnc_1.0.4.bb | 7 +- 5 files changed, 305 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-graphics/neatvnc/neatvnc/0001-Use-nettle-hogweed-version-4.patch create mode 100644 meta-oe/recipes-graphics/neatvnc/neatvnc/0002-crypto-Remove-hash-digest-size-argument.patch create mode 100644 meta-oe/recipes-graphics/neatvnc/neatvnc/0003-stream-ws-handshake-Fix-crypto_hash_many-argument-mi.patch create mode 100644 meta-oe/recipes-graphics/neatvnc/neatvnc/0004-crypto-fix-base16-decode-buffer-length.patch diff --git a/meta-oe/recipes-graphics/neatvnc/neatvnc/0001-Use-nettle-hogweed-version-4.patch b/meta-oe/recipes-graphics/neatvnc/neatvnc/0001-Use-nettle-hogweed-version-4.patch new file mode 100644 index 0000000000..e5335080aa --- /dev/null +++ b/meta-oe/recipes-graphics/neatvnc/neatvnc/0001-Use-nettle-hogweed-version-4.patch @@ -0,0 +1,83 @@ +From 9056d5fc68c2a84bdbbf089fcbac9e2ba7d093cb Mon Sep 17 00:00:00 2001 +From: Andri Yngvason +Date: Sun, 17 May 2026 09:57:07 +0000 +Subject: [PATCH 1/4] Use nettle & hogweed version 4 + +Upstream-Status: Backport [https://github.com/any1/neatvnc/commit/5b190f0fd9e6] +Signed-off-by: Alex Kiernan +--- + meson.build | 6 ++++-- + src/crypto/nettle/cipher.c | 8 ++++---- + src/crypto/nettle/hash.c | 2 +- + 3 files changed, 9 insertions(+), 7 deletions(-) + +diff --git a/meson.build b/meson.build +index cf8d67423f9c..b79606729e94 100644 +--- a/meson.build ++++ b/meson.build +@@ -61,8 +61,10 @@ libm = cc.find_library('m', required: false) + pixman = dependency('pixman-1') + libturbojpeg = dependency('libturbojpeg', required: get_option('jpeg')) + gnutls = dependency('gnutls', required: get_option('tls')) +-nettle = dependency('nettle', required: get_option('nettle')) +-hogweed = dependency('hogweed', required: get_option('nettle')) ++nettle = dependency('nettle', required: get_option('nettle'), ++ version: ['>=4.0', '<5.0']) ++hogweed = dependency('hogweed', required: get_option('nettle'), ++ version: ['>=4.0', '<5.0']) + gmp = dependency('gmp', required: get_option('nettle')) + zlib = dependency('zlib') + gbm = dependency('gbm', required: get_option('gbm')) +diff --git a/src/crypto/nettle/cipher.c b/src/crypto/nettle/cipher.c +index 0dd2262f09cc..6eb8770f2119 100644 +--- a/src/crypto/nettle/cipher.c ++++ b/src/crypto/nettle/cipher.c +@@ -119,7 +119,7 @@ static bool crypto_cipher_aes_eax_encrypt(struct crypto_cipher* self, + (uint8_t*)dst->data + dst->len, src); + dst->len += src_len; + +- nettle_eax_aes128_digest(&self->enc_ctx.aes_eax.ctx, 16, mac); ++ nettle_eax_aes128_digest(&self->enc_ctx.aes_eax.ctx, mac); + + return true; + } +@@ -131,7 +131,7 @@ static ssize_t crypto_cipher_aes_eax_decrypt(struct crypto_cipher* self, + crypto_aes_eax_update_nonce(&self->dec_ctx.aes_eax); + nettle_eax_aes128_update(&self->dec_ctx.aes_eax.ctx, ad_len, ad); + nettle_eax_aes128_decrypt(&self->dec_ctx.aes_eax.ctx, len, dst, src); +- nettle_eax_aes128_digest(&self->dec_ctx.aes_eax.ctx, 16, mac); ++ nettle_eax_aes128_digest(&self->dec_ctx.aes_eax.ctx, mac); + return len; + } + +@@ -179,7 +179,7 @@ static bool crypto_cipher_aes256_eax_encrypt(struct crypto_cipher* self, + (uint8_t*)dst->data + dst->len, src); + dst->len += src_len; + +- EAX_DIGEST(&self->enc_ctx.aes256_eax.ctx, aes256_encrypt, 16, mac); ++ EAX_DIGEST(&self->enc_ctx.aes256_eax.ctx, aes256_encrypt, mac); + + return true; + } +@@ -191,7 +191,7 @@ static ssize_t crypto_cipher_aes256_eax_decrypt(struct crypto_cipher* self, + crypto_aes256_eax_update_nonce(&self->dec_ctx.aes256_eax); + EAX_UPDATE(&self->dec_ctx.aes256_eax.ctx, aes256_encrypt, ad_len, ad); + EAX_DECRYPT(&self->dec_ctx.aes256_eax.ctx, aes256_encrypt, len, dst, src); +- EAX_DIGEST(&self->dec_ctx.aes256_eax.ctx, aes256_encrypt, 16, mac); ++ EAX_DIGEST(&self->dec_ctx.aes256_eax.ctx, aes256_encrypt, mac); + return len; + } + +diff --git a/src/crypto/nettle/hash.c b/src/crypto/nettle/hash.c +index 71318f4a1c0b..9fbfe5f7c717 100644 +--- a/src/crypto/nettle/hash.c ++++ b/src/crypto/nettle/hash.c +@@ -21,7 +21,7 @@ + #include + #include + #include +-#include ++#include + + struct crypto_hash { + union { diff --git a/meta-oe/recipes-graphics/neatvnc/neatvnc/0002-crypto-Remove-hash-digest-size-argument.patch b/meta-oe/recipes-graphics/neatvnc/neatvnc/0002-crypto-Remove-hash-digest-size-argument.patch new file mode 100644 index 0000000000..526b446cf4 --- /dev/null +++ b/meta-oe/recipes-graphics/neatvnc/neatvnc/0002-crypto-Remove-hash-digest-size-argument.patch @@ -0,0 +1,160 @@ +From 11dc4a4ce000fd3de7699da939195726b147d5de Mon Sep 17 00:00:00 2001 +From: Andri Yngvason +Date: Tue, 19 May 2026 21:23:59 +0000 +Subject: [PATCH 2/4] crypto: Remove hash digest size argument + +This has been removed in nettle 4. + +Upstream-Status: Backport [https://github.com/any1/neatvnc/commit/f97805deaaea] +Signed-off-by: Alex Kiernan +--- + include/crypto.h | 7 +++---- + src/auth/apple-dh.c | 3 +-- + src/auth/rsa-aes.c | 16 ++++++++-------- + src/crypto/nettle/hash.c | 14 +++++++------- + src/stream/ws/handshake.c | 3 +-- + 5 files changed, 20 insertions(+), 23 deletions(-) + +diff --git a/include/crypto.h b/include/crypto.h +index 9a1aee415f12..1e5886f7b2fe 100644 +--- a/include/crypto.h ++++ b/include/crypto.h +@@ -88,12 +88,11 @@ void crypto_hash_del(struct crypto_hash* self); + + void crypto_hash_append(struct crypto_hash* self, const uint8_t* src, + size_t len); +-void crypto_hash_digest(struct crypto_hash* self, uint8_t* dst, +- size_t len); ++void crypto_hash_digest(struct crypto_hash* self, uint8_t* dst); + +-void crypto_hash_one(uint8_t* dst, size_t dst_len, enum crypto_hash_type type, ++void crypto_hash_one(uint8_t* dst, enum crypto_hash_type type, + const uint8_t* src, size_t src_len); +-void crypto_hash_many(uint8_t* dst, size_t dst_len, enum crypto_hash_type type, ++void crypto_hash_many(uint8_t* dst, enum crypto_hash_type type, + const struct crypto_data_entry *src); + + // RSA +diff --git a/src/auth/apple-dh.c b/src/auth/apple-dh.c +index 43833970892c..238561861155 100644 +--- a/src/auth/apple-dh.c ++++ b/src/auth/apple-dh.c +@@ -78,8 +78,7 @@ int apple_dh_handle_response(struct nvnc_client* client) + crypto_key_del(shared_secret); + + uint8_t hash[16] = {}; +- crypto_hash_one(hash, sizeof(hash), CRYPTO_HASH_MD5, shared_buf, +- sizeof(shared_buf)); ++ crypto_hash_one(hash, CRYPTO_HASH_MD5, shared_buf, sizeof(shared_buf)); + + struct crypto_cipher* cipher; + cipher = crypto_cipher_new(NULL, hash, CRYPTO_CIPHER_AES128_ECB); +diff --git a/src/auth/rsa-aes.c b/src/auth/rsa-aes.c +index dea2e7c84e2d..d2f217d4c501 100644 +--- a/src/auth/rsa-aes.c ++++ b/src/auth/rsa-aes.c +@@ -154,8 +154,8 @@ static int on_rsa_aes_challenge(struct nvnc_client* client) + + // ClientSessionKey = the first 16 bytes of SHA1(ServerRandom || ClientRandom) + uint8_t client_session_key[32]; +- crypto_hash_many(client_session_key, client_rsa_aes_hash_len(client), +- client->rsa.hash_type, (const struct crypto_data_entry[]) { ++ crypto_hash_many(client_session_key, client->rsa.hash_type, ++ (const struct crypto_data_entry[]) { + { client->rsa.challenge, client->rsa.challenge_len }, + { client_random, client->rsa.challenge_len }, + {} +@@ -163,8 +163,8 @@ static int on_rsa_aes_challenge(struct nvnc_client* client) + + // ServerSessionKey = the first 16 bytes of SHA1(ClientRandom || ServerRandom) + uint8_t server_session_key[32]; +- crypto_hash_many(server_session_key, client_rsa_aes_hash_len(client), +- client->rsa.hash_type, (const struct crypto_data_entry[]) { ++ crypto_hash_many(server_session_key, client->rsa.hash_type, ++ (const struct crypto_data_entry[]) { + { client_random, client->rsa.challenge_len }, + { client->rsa.challenge, client->rsa.challenge_len }, + {} +@@ -195,8 +195,8 @@ static int on_rsa_aes_challenge(struct nvnc_client* client) + uint32_t client_key_len_be = htonl(client_key_len * 8); + + uint8_t server_hash[32] = {}; +- crypto_hash_many(server_hash, client_rsa_aes_hash_len(client), +- client->rsa.hash_type, (const struct crypto_data_entry[]) { ++ crypto_hash_many(server_hash, client->rsa.hash_type, ++ (const struct crypto_data_entry[]) { + { (uint8_t*)&server_key_len_be, 4 }, + { server_modulus, server_key_len }, + { server_exponent, server_key_len }, +@@ -249,8 +249,8 @@ static int on_rsa_aes_client_hash(struct nvnc_client* client) + uint32_t client_key_len_be = htonl(client_key_len * 8); + + uint8_t client_hash[32] = {}; +- crypto_hash_many(client_hash, client_rsa_aes_hash_len(client), +- client->rsa.hash_type, (const struct crypto_data_entry[]) { ++ crypto_hash_many(client_hash, client->rsa.hash_type, ++ (const struct crypto_data_entry[]) { + { (uint8_t*)&client_key_len_be, 4 }, + { client_modulus, client_key_len }, + { client_exponent, client_key_len }, +diff --git a/src/crypto/nettle/hash.c b/src/crypto/nettle/hash.c +index 9fbfe5f7c717..832953305d44 100644 +--- a/src/crypto/nettle/hash.c ++++ b/src/crypto/nettle/hash.c +@@ -31,7 +31,7 @@ struct crypto_hash { + } ctx; + + void (*update)(void* ctx, size_t len, const uint8_t* src); +- void (*digest)(void* ctx, size_t len, uint8_t* dst); ++ void (*digest)(void* ctx, uint8_t* dst); + }; + + struct crypto_hash* crypto_hash_new(enum crypto_hash_type type) +@@ -75,27 +75,27 @@ void crypto_hash_append(struct crypto_hash* self, const uint8_t* src, + self->update(&self->ctx, len, src); + } + +-void crypto_hash_digest(struct crypto_hash* self, uint8_t* dst, size_t len) ++void crypto_hash_digest(struct crypto_hash* self, uint8_t* dst) + { +- self->digest(&self->ctx, len, dst); ++ self->digest(&self->ctx, dst); + } + +-void crypto_hash_one(uint8_t* dst, size_t dst_len, enum crypto_hash_type type, ++void crypto_hash_one(uint8_t* dst, enum crypto_hash_type type, + const uint8_t* src, size_t src_len) + { + struct crypto_hash *hash = crypto_hash_new(type); + crypto_hash_append(hash, src, src_len); +- crypto_hash_digest(hash, dst, dst_len); ++ crypto_hash_digest(hash, dst); + crypto_hash_del(hash); + } + +-void crypto_hash_many(uint8_t* dst, size_t dst_len, enum crypto_hash_type type, ++void crypto_hash_many(uint8_t* dst, enum crypto_hash_type type, + const struct crypto_data_entry *src) + { + struct crypto_hash *hash = crypto_hash_new(type); + for (int i = 0; src[i].data && src[i].len; ++i) + crypto_hash_append(hash, src[i].data, src[i].len); +- crypto_hash_digest(hash, dst, dst_len); ++ crypto_hash_digest(hash, dst); + crypto_hash_del(hash); + } + +diff --git a/src/stream/ws/handshake.c b/src/stream/ws/handshake.c +index 80881189236e..aa0db3f9f2c2 100644 +--- a/src/stream/ws/handshake.c ++++ b/src/stream/ws/handshake.c +@@ -79,8 +79,7 @@ ssize_t ws_handshake(char* output, size_t output_maxlen, const char* input) + goto failure; + + uint8_t hash[20]; +- crypto_hash_many(hash, sizeof(hash), CRYPTO_HASH_SHA1, +- (struct crypto_data_entry[]){ ++ crypto_hash_many(hash, sizeof(hash), (struct crypto_data_entry[]){ + { (uint8_t*)challenge, strlen(challenge) }, + { (uint8_t*)magic_uuid, strlen(magic_uuid) }, + {} diff --git a/meta-oe/recipes-graphics/neatvnc/neatvnc/0003-stream-ws-handshake-Fix-crypto_hash_many-argument-mi.patch b/meta-oe/recipes-graphics/neatvnc/neatvnc/0003-stream-ws-handshake-Fix-crypto_hash_many-argument-mi.patch new file mode 100644 index 0000000000..4be9ac9c6d --- /dev/null +++ b/meta-oe/recipes-graphics/neatvnc/neatvnc/0003-stream-ws-handshake-Fix-crypto_hash_many-argument-mi.patch @@ -0,0 +1,27 @@ +From 0c1a96814ac70ae59905cfbb013c3d6e3147b703 Mon Sep 17 00:00:00 2001 +From: Andri Yngvason +Date: Thu, 30 Jul 2026 10:35:25 +0000 +Subject: [PATCH 3/4] stream: ws: handshake: Fix crypto_hash_many argument + mixup + +This fixes mistake in f97805deaaea489a1c8c851324163a92a3125195. + +Upstream-Status: Backport [https://github.com/any1/neatvnc/commit/8e0d226064d0] +Signed-off-by: Alex Kiernan +--- + src/stream/ws/handshake.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/stream/ws/handshake.c b/src/stream/ws/handshake.c +index aa0db3f9f2c2..9cb6f1c58856 100644 +--- a/src/stream/ws/handshake.c ++++ b/src/stream/ws/handshake.c +@@ -79,7 +79,7 @@ ssize_t ws_handshake(char* output, size_t output_maxlen, const char* input) + goto failure; + + uint8_t hash[20]; +- crypto_hash_many(hash, sizeof(hash), (struct crypto_data_entry[]){ ++ crypto_hash_many(hash, CRYPTO_HASH_SHA1, (struct crypto_data_entry[]){ + { (uint8_t*)challenge, strlen(challenge) }, + { (uint8_t*)magic_uuid, strlen(magic_uuid) }, + {} diff --git a/meta-oe/recipes-graphics/neatvnc/neatvnc/0004-crypto-fix-base16-decode-buffer-length.patch b/meta-oe/recipes-graphics/neatvnc/neatvnc/0004-crypto-fix-base16-decode-buffer-length.patch new file mode 100644 index 0000000000..b550495b7a --- /dev/null +++ b/meta-oe/recipes-graphics/neatvnc/neatvnc/0004-crypto-fix-base16-decode-buffer-length.patch @@ -0,0 +1,29 @@ +From 556ea1d187a70c08c99d0871c8920e3f7874664f Mon Sep 17 00:00:00 2001 +From: Chad Voegele +Date: Thu, 11 Jun 2026 12:41:03 +0000 +Subject: [PATCH 4/4] crypto: fix base16 decode buffer length + +Upstream-Status: Backport [https://github.com/any1/neatvnc/commit/8057ec4ad673] +Signed-off-by: Alex Kiernan +--- + src/crypto/nettle/key.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/crypto/nettle/key.c b/src/crypto/nettle/key.c +index 3b69de259436..45e53187fc22 100644 +--- a/src/crypto/nettle/key.c ++++ b/src/crypto/nettle/key.c +@@ -91,7 +91,7 @@ static void initialise_p(mpz_t p) + "15728E5A8AACAA68FFFFFFFFFFFFFFFF"; + + char buf[256]; +- size_t len = 0; ++ size_t len = sizeof(buf); + struct base16_decode_ctx ctx; + nettle_base16_decode_init(&ctx); + nettle_base16_decode_update(&ctx, &len, (uint8_t*)buf, sizeof(s) - 1, s); +@@ -174,4 +174,3 @@ struct crypto_key* crypto_derive_shared_secret( + + return shared; + } +- diff --git a/meta-oe/recipes-graphics/neatvnc/neatvnc_1.0.4.bb b/meta-oe/recipes-graphics/neatvnc/neatvnc_1.0.4.bb index 44e3b156f9..c341b21a64 100644 --- a/meta-oe/recipes-graphics/neatvnc/neatvnc_1.0.4.bb +++ b/meta-oe/recipes-graphics/neatvnc/neatvnc_1.0.4.bb @@ -4,7 +4,12 @@ HOMEPAGE = "https://github.com/any1/neatvnc" LICENSE = "ISC" LIC_FILES_CHKSUM = "file://COPYING;md5=94fc374e7174f41e3afe0f027ee59ff7" -SRC_URI = "git://github.com/any1/neatvnc;branch=v1.0;protocol=https;tag=v${PV}" +SRC_URI = "git://github.com/any1/neatvnc;branch=v1.0;protocol=https;tag=v${PV} \ + file://0001-Use-nettle-hogweed-version-4.patch \ + file://0002-crypto-Remove-hash-digest-size-argument.patch \ + file://0003-stream-ws-handshake-Fix-crypto_hash_many-argument-mi.patch \ + file://0004-crypto-fix-base16-decode-buffer-length.patch \ + " SRCREV = "ffce32d6d04e702d5d8055e28e038c7f68a0caf4"