#1011440 libsnmp-perl: behaviour fixed in do_not_callback_for_failed_reports.diff reintroduced in bullseye

Package:
libsnmp-perl
Source:
net-snmp
Description:
SNMP (Simple Network Management Protocol) Perl5 support
Submitter:
Ole Peder Brandtzæg
Date:
2022-05-25 22:39:03 UTC
Severity:
normal
Tags:
#1011440#5
Date:
2022-05-22 22:29:53 UTC
From:
To:
Dear Maintainer,

Upon upgrading from buster to bullseye this weekend, which included
libsnmp-perl going from 5.7.3 to 5.9, we noticed that one of our Perl
scripts utilising SNMP started segfaulting. Stacktraces[0] indicate
similar behaviour to what Steinar H. Gunderson described in his
do_not_callback_for_failed_reports patch.[1] Looking at the source tree,
it appears this patch was commented out just after 5.8 was released,[2]
presumably due to this upstream refactor of the receive API.[3] My
knowledge of both C and SNMP is unfortunately too lacking for it to be
apparent to me what would need to change to make it possible to reapply
the patch to the refactored functions. Any ideas on how to proceed?

All the best,
Ole Peder Brandtzæg

P.S. This is my time reporting a bug with a Debian package – do let me
know if I've done something wrong or you require additional information!

[0]: https://pastebin.com/366kWZNS
[1]: https://marc.info/?l=net-snmp-coders&m=141374910528458&w=3
[2]:
https://salsa.debian.org/debian/net-snmp/-/commit/20442f3b7a0410f5da27399017436c623c705415?page=2
[3]:
https://github.com/net-snmp/net-snmp/commit/a9ce31c4b8187aea07a648cf115e956159ac072e

#1011440#10
Date:
2022-05-23 13:00:55 UTC
From:
To:
Hi Ole,
  It looks like that offending code wasn't removed, it was just
relocated further along [1].
Looking at what they have done for net-snmp 5.9.2 snmplib/snmp_api.c
isn't changed between 5.9 and 5.9.2 so I'll apply it as the problem
isn't going away.

Your bug report was fine BTW. If there was an easy proof of concept
that is even better but this looks like its a timing issue with
delayed responses. The information helped get a resolution for me
pretty quickly.

 - Craig

1: https://github.com/net-snmp/net-snmp/blob/V5-9-patches/snmplib/snmp_api.c#L5772

#1011440#15
Date:
2022-05-23 16:58:21 UTC
From:
To:
Ah, my bad! All the indentation differences in the original patch made
it unclear to me what it actually did…

Wonderful, thanks a bunch. I presume this won't land in stable anytime
soon though, right, but maybe in backports?

All the best,
Ole

#1011440#18
Date:
2022-05-25 12:10:27 UTC
From:
To:
Hello,

Bug #1011440 in net-snmp reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/debian/net-snmp/-/commit/f9d29807d65d66c35bb640a72e147f01bbb44d15

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1011440

#1011440#25
Date:
2022-05-25 22:34:09 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
net-snmp, 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 1011440@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Craig Small <csmall@debian.org> (supplier of updated net-snmp 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: Wed, 25 May 2022 22:09:23 +1000
Source: net-snmp
Architecture: source
Version: 5.9.1+dfsg-2
Distribution: unstable
Urgency: medium
Maintainer: Debian SNMP Team <team+snmp@tracker.debian.org>
Changed-By: Craig Small <csmall@debian.org>
Closes: 997895 998152 1011440
Changes:
 net-snmp (5.9.1+dfsg-2) unstable; urgency=medium
 .
   * Fix path for net-snmp-create-v3-user Closes: #997895
   * Use pidof for net-snmp-create-v3-user so don't need procps
   * Make snmpd.conf group readable Closes: #998152
   * Reapplied perl callback patch Closes: #1011440
Checksums-Sha1:
 0622c151801626391c103f6c57aa878c08c252da 2812 net-snmp_5.9.1+dfsg-2.dsc
 24b605ff686e18d1e7ed830090c9616af509ae20 69120 net-snmp_5.9.1+dfsg-2.debian.tar.xz
 111486f050e1efd8c932c6cd3113a4dc571c310e 10433 net-snmp_5.9.1+dfsg-2_amd64.buildinfo
Checksums-Sha256:
 3c14de1c885f25ab10f6546b816394e58cddacd841d7f987d07c71c26bef1c77 2812 net-snmp_5.9.1+dfsg-2.dsc
 8851f207021c5622c9f2713230ff6c85542aa3db5a59178afbf6c29016e32cc0 69120 net-snmp_5.9.1+dfsg-2.debian.tar.xz
 6f96672dc4d42a3f38d7c0f1223a0f1614ce5b06004c8b4f3e08219082a340af 10433 net-snmp_5.9.1+dfsg-2_amd64.buildinfo
Files:
 e39fc03c0496ef931d4799d0cb38b1db 2812 net optional net-snmp_5.9.1+dfsg-2.dsc
 357b8feb99b1bc4577684fdc975c2676 69120 net optional net-snmp_5.9.1+dfsg-2.debian.tar.xz
 f25cf9e2afe661984ea6c9c9bbb62fec 10433 net optional net-snmp_5.9.1+dfsg-2_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEXT3w9TizJ8CqeneiAiFmwP88hOMFAmKOqy0ACgkQAiFmwP88
hOPA+w/9Fe833CAYk1EMwh1McPqwfzWvmRy+/9BuW+AT94NBgeVtdZcnVu1EWAQy
6Kkbz2YhSNJRy5buvYXTEjPL/RtUrUR2LEngdjTnYnKHYNo6CTH+NiiAqngGpQZx
BIjzLzAG+6+tDV8HpNEBuFJXiS/Q1tXWA6kZEBX/aTlgWIaZBjZLfkLbqChfnj9l
z7oxvjPoh0eiJ8Lg5WtOb9d9j2EK3YsnQR8FJpbQ+XKlxzvlX0+x8EB5U+ui31m8
lCASpwjHHJ5vfJlmSnEYFh5Gfi0zW5lk7krnImM6g8fyibTZI1da5egBMzVEfeEB
zny18MNycDvySpFCXrBsH1A1pZb3iMSc1ApxbgY2CY0aIFXrDYycU0Xbk3pzMSsV
PRFZljxVU6VRrtq9LaTyVtsiJiQWdcLy0pifrjutQK6nMfC1E42h55aBpiTFBVtq
nquRMUXjsnaHFUZx/bPHSaAVVut5ytha+v5uwlTGAb2EPAAVUIjH+HJntlVcv7y0
bEf+7cOZdcYJtkTTRF6/sD2nAuADrNAeMMgQaCpuPgiaFVWsCk/ZPureWO9hcFd0
drHmLluAdBFWQ8MdyYsk7gCa/edQysN5k6H9UUjf+Zg1vISJb6s1Sl4TKBZ57lzr
+fqEdMoC/9gBBsODtk/Iut2SlkUbG4VbUY3muZceUNoz1iauFEE=
=tQ85
-----END PGP SIGNATURE-----