[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#947808: marked as done (libvncserver: Please backport small patch to fix unaligned access on sparc64)



Your message dated Thu, 02 Jan 2020 14:48:01 +0000
with message-id <E1in1lZ-000GnL-AF@fasolo.debian.org>
and subject line Bug#947808: fixed in libvncserver 0.9.12+dfsg-6
has caused the Debian Bug report #947808,
regarding libvncserver: Please backport small patch to fix unaligned access on sparc64
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
947808: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=947808
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: libvncserver
Version: 0.9.12+dfsg-5
Severity: normal
Tags: patch
User: debian-sparc@lists.debian.org
Usertags: sparc64

Hi!

The testsuite of libvncserver currently crashes on sparc64 due to
unaligned access:

Running tests...
/usr/bin/ctest --force-new-ctest-process -j32
Test project /<<PKGBUILDDIR>>/obj-sparc64-linux-gnu
    Start 1: cargs
    Start 2: turbojpeg
    Start 3: wstest
1/3 Test #1: cargs ............................   Passed    0.01 sec
2/3 Test #3: wstest ...........................Bus error***Exception:   0.01 sec

3/3 Test #2: turbojpeg ........................   Passed   16.52 sec

67% tests passed, 1 tests failed out of 3

Total Test time (real) =  16.52 sec

This has been fixed upstream in:

commit 0cf1400c61850065de590d403f6d49e32882fd76
Author: Rolf Eike Beer <eike@sf-mail.de>
Date:   Tue May 28 18:30:46 2019 +0200

    fix crash because of unaligned accesses in hybiReadAndDecode()

I'm attaching the backported patch. Could you include it in the
next upload?

Thanks,
Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
>From 0cf1400c61850065de590d403f6d49e32882fd76 Mon Sep 17 00:00:00 2001
From: Rolf Eike Beer <eike@sf-mail.de>
Date: Tue, 28 May 2019 18:30:46 +0200
Subject: [PATCH] fix crash because of unaligned accesses in
 hybiReadAndDecode()

---
 libvncserver/ws_decode.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libvncserver/ws_decode.c b/libvncserver/ws_decode.c
index 441ebc7..10c44d1 100644
--- a/libvncserver/ws_decode.c
+++ b/libvncserver/ws_decode.c
@@ -327,7 +327,6 @@ hybiReadAndDecode(ws_ctx_t *wsctx, char *dst, int len, int *sockRet, int nInBuf)
   int bufsize;
   int nextRead;
   unsigned char *data;
-  uint32_t *data32;
 
   /* if data was carried over, copy to start of buffer */
   memcpy(wsctx->writePos, wsctx->carryBuf, wsctx->carrylen);
@@ -383,10 +382,12 @@ hybiReadAndDecode(ws_ctx_t *wsctx, char *dst, int len, int *sockRet, int nInBuf)
   /* for a possible base64 decoding, we decode multiples of 4 bytes until
    * the whole frame is received and carry over any remaining bytes in the carry buf*/
   data = (unsigned char *)(wsctx->writePos - toDecode);
-  data32= (uint32_t *)data;
 
   for (i = 0; i < (toDecode >> 2); i++) {
-    data32[i] ^= wsctx->header.mask.u;
+    uint32_t tmp;
+    memcpy(&tmp, data + i * sizeof(tmp), sizeof(tmp));
+    tmp ^= wsctx->header.mask.u;
+    memcpy(data + i * sizeof(tmp), &tmp, sizeof(tmp));
   }
   ws_dbg("mask decoding; i=%d toDecode=%d\n", i, toDecode);
 
-- 
2.25.0.rc0


--- End Message ---
--- Begin Message ---
Source: libvncserver
Source-Version: 0.9.12+dfsg-6

We believe that the bug you reported is fixed in the latest version of
libvncserver, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 947808@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Mike Gabriel <sunweaver@debian.org> (supplier of updated libvncserver package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 02 Jan 2020 15:04:42 +0100
Source: libvncserver
Architecture: source
Version: 0.9.12+dfsg-6
Distribution: unstable
Urgency: medium
Maintainer: Debian Remote Maintainers <debian-remote@lists.debian.org>
Changed-By: Mike Gabriel <sunweaver@debian.org>
Closes: 946615 947808
Changes:
 libvncserver (0.9.12+dfsg-6) unstable; urgency=medium
 .
   [ Sebastien Bacher ]
   * debian/tests:
     + Use the correct compiler for proposed autopkgtest cross-testing support.
       (Closes: #946615).
 .
   [ Mike Gabriel ]
   * debian/patches:
     + Add 0002_fix-crash-because-of-unaligned-accesses-in-hybiReadAndDecode.patch.
       Fix FTBFS on sparc64 architecture. (Closes: #947808).
Checksums-Sha1:
 06330dfd0c87182e4ec4a74aa2adbc55bf74e0cc 2326 libvncserver_0.9.12+dfsg-6.dsc
 d1b90ea5f5eb9cce7cbd949d48871b99489943b0 16044 libvncserver_0.9.12+dfsg-6.debian.tar.xz
 d7c2c8820dbf7b8ffb78513f2b39ad3bdfa6d062 8034 libvncserver_0.9.12+dfsg-6_source.buildinfo
Checksums-Sha256:
 ddb5511985eaf9277d985b81d2c5be8c14b02b0df57179698a52388992a6d32a 2326 libvncserver_0.9.12+dfsg-6.dsc
 5eac2f27777720ebeafa300ac065be44bc218fe1290741e150462c4f5accba8d 16044 libvncserver_0.9.12+dfsg-6.debian.tar.xz
 8f9b0c0fef21c961f89b441ff01201a1925ddc50362e95d2ac8fd1291b192965 8034 libvncserver_0.9.12+dfsg-6_source.buildinfo
Files:
 7f4e48160052232785a87f5e41ab2d00 2326 libs optional libvncserver_0.9.12+dfsg-6.dsc
 0d3667428dcd23510826d62ab626d133 16044 libs optional libvncserver_0.9.12+dfsg-6.debian.tar.xz
 a475d8094d3ffa2c8d646fe170a85d88 8034 libs optional libvncserver_0.9.12+dfsg-6_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEm/uu6GwKpf+/IgeCmvRrMCV3GzEFAl4N+LoVHHN1bndlYXZl
ckBkZWJpYW4ub3JnAAoJEJr0azAldxsxAm4QALfBL4SzVg9/MpwkhgetzHV4pH0G
tkCxyAKEq338vJHPN1F2Z9FwHWjnyHOp1zrR3672EgcytxCIuROxWMMyuEfJqmLR
jw7H9cTue2NxOlLeSH+FpE8DQFy00xzUdaAnbqYw+PGAk5j1EhZevDOct/4Hzs6L
aceL5M33xyWuTMraDzmvQEX9nd2AxV6lvCZHoIqdR5ilAnT1/FT/tOqoCiUswjmv
7Ik1HNlnna16s+ElQE0bJ6ziq7uo+WSw652d1x4JrYgYqcwzpeckV4ybRHuS3sle
TupwPBXc5weKOaEUIGAaXigHjaZdWzDsA502tm3CyVIEgqXOdhFMOaEpKA1ElaPL
G3VKxzd/sJeAppf96FQpoxycTVQhtP/SqxfsfjMUNhqoUZRvJ0QyvgeEdCeCPO4q
famb9KQHkarVGK7FSUITkGF5s2DU9yldZz7m3WhJp4rF3x2Ag+lhBtnDqmbY5kBC
db1FmF2CNJy/WOSarlTCoJ3xUuEqw4cb5qLURUwrhyU3eOvjM/OUY2H/rHY/HPTL
DLchCsEW44A7wBprSzBYHJAwOBfR8YvwbTispxqz2+Hkld/G8HZKTO9SHj5m8XJ4
zlJAr0qMXMAhuD4jda71cCosaJhfnazcYHw+lLEk10jIrZs2u9RRzd1ZlDNQPEjz
ISGFbJJ2a4zauAgt
=aG/m
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: