#862596 libasyncns0: Assignment instead of check for equality in assert: asyncns_setuserdata, asyncns_getuserdata

Package:
libasyncns0
Source:
libasyncns
Description:
Asynchronous name service query library
Submitter:
Myhailo Danylenko
Date:
2026-06-06 06:07:03 UTC
Severity:
minor
Tags:
#862596#5
Date:
2017-05-14 22:25:51 UTC
From:
To:
Hello.

Since I forwarded my bugreport, I'll also forward this one, quite
obvious, and still present one, reported by Olof Sivertsson:
https://bugs.freedesktop.org/show_bug.cgi?id=91859

Bug applies to libasyncns release 0.8 and current git revision 68cd5a.

Both asyncns_setuserdata(...) and asyncns_getuserdata(...) contain the
following line:

  assert(q->asyncns = asyncns);


I believe this should not be assignment, but a check for equality, as is
correctly done already in asyncns_isdone(...):

  assert(q->asyncns == asyncns);

This bug probably does not realistically affect anything right now, but
theoretically it's a bad thing, since in an environment, where there's
several asyncns objects, a programming error instead of triggering
assertion may reassign query object to another asyncns object, that may
lead to various use-after-free issues and mystical bugs/crashes.

#862596#10
Date:
2026-06-06 06:04:16 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
libasyncns, 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 862596@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jayen Ashar <debian@jayenashar.org> (supplier of updated libasyncns 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)
Format: 1.8
Date: Sat, 06 Jun 2026 09:33:47 +1000
Source: libasyncns
Architecture: source
Version: 0.8-8
Distribution: unstable
Urgency: medium
Maintainer: Jayen Ashar <debian@jayenashar.org>
Changed-By: Jayen Ashar <debian@jayenashar.org>
Closes: 862594 862596 1123614
Changes:
 libasyncns (0.8-8) unstable; urgency=medium
 .
   [ Jayen Ashar ]
   * New maintainer (Closes: #1123614).
   * Apply equality_in_assert.patch — fixes assignment-instead-of-comparison
     in two asserts (Closes: #862596).
   * Apply pthreads.patch — pthread_cancel before pthread_join so a blocked
     worker no longer freezes asyncns_free() (Closes: #862594).
   * Add Forwarded: header to both new patches (point at the upstream
     freedesktop bugs cited in Origin).
   * d/watch: switch URL to https.
   * d/upstream/metadata: add DEP-12 stub.
   * Standards-Version: 4.7.4. (Removed Priority field)
   * d/watch: match upstream's absolute http:// tarball links and
     downloadurlmangle the fetch to https. The https-only pattern matched
     nothing on the index page, which failed the Salsa CI test-uscan job.
 .
   [ Andreas Tille ]
   * d/watch: version=5
   * lintian-overrides for false positive debian-watch-uses-insecure-uri
Checksums-Sha1:
 5a405f8d816fd14d7e5eaa30129873b3dc861810 1944 libasyncns_0.8-8.dsc
 7f92ab601a9b6b2a6063a53806a1243f8c59a1b0 5780 libasyncns_0.8-8.debian.tar.xz
 98ed58b2e077a40a45dc932e3b7a558c32e05f5f 6473 libasyncns_0.8-8_amd64.buildinfo
Checksums-Sha256:
 f1c6736238bba3b3469bf1af18c5ebdde62bf35ee890921b9c8f85c46c5d34d0 1944 libasyncns_0.8-8.dsc
 e85395eb741d4181078fff150fc3f36002a2cc5e6d9072657bcd6f806a955e67 5780 libasyncns_0.8-8.debian.tar.xz
 d97f7a4cfe43a9d4d3492a7770103ab7c1c838587e8acb3e03aea0a0f7008f5a 6473 libasyncns_0.8-8_amd64.buildinfo
Files:
 f5dc7d06c66cba9ba014339ed810dadc 1944 libs optional libasyncns_0.8-8.dsc
 e69708e5eddf4704bd6cfa0c107c09cf 5780 libs optional libasyncns_0.8-8.debian.tar.xz
 8ba772c249e0140b1f52a7b49ebecea5 6473 libs optional libasyncns_0.8-8_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJFBAEBCgAvFiEE8fAHMgoDVUHwpmPKV4oElNHGRtEFAmojtM4RHHRpbGxlQGRl
Ymlhbi5vcmcACgkQV4oElNHGRtGFYQ/+L7DU1lpqmz408CK53aA2ul47tmx9eGCb
H4O6l0XnAI49Saqkmu+hflkL5wk64+lS6t0IBGfByab5NX9rUzfjt5HO0nqyL8uR
lu25SS9rcAv9sEdaR7r0QI5aKL6+vU2eq72sjmVQwia+aPfLEEjdBYcSlTsPNYeQ
kFmC8LxIQsWC3qlPm8zC0i52Kl84HWUuwTFKKYeUHzEPT6MsCcxLTxg6wp5ErE0A
qfo03LVWQFw2phvKTuUYDbF6gTs1VsdhtTngdVQToO0wQysTAUF3+HkokmsNAD8W
yOs5MZcAmGTblsJTasgNl7PlK9H0ATsXICtKxHLayYhKzIDNe4BllZnGRNZ0D2lp
x35vrtyerq9+o+dX0npxQHjimkiA3850VxFXj6c7IGugd/ygSEuJAQL3PzHbnbxz
tJlLjW1i0UVCJazpwJbuq4zuX9zFdMTTdA/Nf/8lhO0v9c78wazyhQHud2Hf7Ir6
yNG5PUQ6OLybQhIxbCgTXIotInlc3GV4EvmG6V/h7QCjWf+Si2czNsipyjbeR6/L
KPoGuU5Zpj9dPEfnEpNW5CicwRIzKC7WJr2Aeimlgru+rDmUHVFJcASOwT2aXGjK
YuYKcCZ2RIzR2bchXy9Ul8kd/rtqvRGIaT3BbPbWHdEm1tUHGifm7/oncdZLS+Uv
iK/jM/W4kaE=
=K6bR
-----END PGP SIGNATURE-----