Merge ~sergiodj/ubuntu/+source/net-snmp:double-free-bug1877027-focal into ubuntu/+source/net-snmp:ubuntu/focal-devel
Status: | Rejected |
---|---|
Rejected by: | Andreas Hasenack on 2020-07-03 |
Proposed branch: | ~sergiodj/ubuntu/+source/net-snmp:double-free-bug1877027-focal |
Merge into: | ubuntu/+source/net-snmp:ubuntu/focal-devel |
Diff against target: |
872 lines (+820/-0) 8 files modified
debian/changelog (+21/-0) debian/patches/fix-usmStateReference-free.patch (+31/-0) debian/patches/introduce-refcount-usmStateReference.patch (+169/-0) debian/patches/move-free-securityStateRef-into-snmp-free-pdu.patch (+92/-0) debian/patches/move-securityStateRef-into-free_securityStateRef.patch (+78/-0) debian/patches/prevent-snmpv3-bulkget-errors-double-free.patch (+349/-0) debian/patches/series (+6/-0) debian/patches/unexport-struct-usmStateReference.patch (+74/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andreas Hasenack | 2020-06-23 | Pending | |
Canonical Server Team | 2020-06-23 | Pending | |
Review via email:
|
Description of the change
This series of patches fix a segmentation fault that occurs with snmpd on focal when the user requests an erroneous bulkget operation using the snmpv3 protocol. It took me a while to figure out the right set of patches that needed to be backported in order to address this issue, mostly because this is my first rodeo with snmp but also because upstream addressed this using different bug numbers.
To reproduce the issue, one can do:
$ lxc launch ubuntu-daily:focal net-snmp-bug1877027-focal
$ lxc shell net-snmp-bug1877027-focal
# apt update
# apt install -y snmpd snmp
# systemctl stop snmpd.service
# cat >> /var/lib/
createUser testuser SHA "testpass" AES "testpass"
__EOF__
# cat >> /etc/snmp/
rwuser testuser
__EOF__
# systemct start snmpd.service
# snmpbulkget -v3 -Cn1 -Cr1472 -l authPriv -u testuser -a SHA -A testpass -x AES -X testpass 127.0.0.1 1.3.6.1.2.1.1.5 1.3.6.1.2.1.1.7
You can check that snmpd crashed by doing:
# systemctl status snmpd.service
There is a PPA with the proposed fix here:
https:/
After installing it, one can check that the fix worked by doing:
# snmpbulkget -v3 -Cn1 -Cr1472 -l authPriv -u testuser -a SHA -A testpass -x AES -X testpass 127.0.0.1 1.3.6.1.2.1.1.5 1.3.6.1.2.1.1.7
Error in packet.
Reason: (genError) A general failure occured
Initially, I wasn't sure if this error should have happened or not. However, after compiling the upstream project and running it here, I noticed that it also displays this error message.
One of the persons interested in the bug was able to try the PPA and confirmed that it solves the segmentation fault for him.
autopkgtest is still happy:
autopkgtest [16:07:24]: test command1: perl -MSNMP -e1
autopkgtest [16:07:24]: test command1: [------
autopkgtest [16:07:24]: test command1: -------
autopkgtest [16:07:25]: test command1: - - - - - - - - - - results - - - - - - - - - -
command1 PASS
autopkgtest [16:07:26]: @@@@@@@
command1 PASS
Andreas Hasenack (ahasenack) wrote : | # |
Christian Ehrhardt (paelzer) wrote : | # |
Let us set this back to WIP (to clear the overview) until it is resolved either way
Sergio Durigan Junior (sergiodj) wrote : | # |
On Friday, July 03 2020, Christian Ehrhardt wrote:
> Let us set this back to WIP (to clear the overview) until it is resolved either way
Thanks, Christian. This MP can be "abandoned" now, since the security
team has taken over and uploaded this fix on Focal. I can't change the
MP's status to anything other than "WIP"/"Needs Review"/"Merged", and I
think it's a good idea to keep this MP archived here (i.e., I don't want
to delete it). Could you please "abandon" it for me?
Thanks.
--
Sergio
GPG key ID: E92F D0B3 6B14 F1F4 D8E0 EB2F 106D A1C8 C3CB BF14
Sergio Durigan Junior (sergiodj) wrote : | # |
On Friday, July 03 2020, I wrote:
> On Friday, July 03 2020, Christian Ehrhardt wrote:
>
>> Let us set this back to WIP (to clear the overview) until it is resolved either way
>
> Thanks, Christian. This MP can be "abandoned" now, since the security
> team has taken over and uploaded this fix on Focal. I can't change the
> MP's status to anything other than "WIP"/"Needs Review"/"Merged", and I
> think it's a good idea to keep this MP archived here (i.e., I don't want
> to delete it). Could you please "abandon" it for me?
FWIW, this is the upload done by the security team:
https:/
Thanks,
--
Sergio
GPG key ID: E92F D0B3 6B14 F1F4 D8E0 EB2F 106D A1C8 C3CB BF14
Unmerged commits
- 5f5cf72... by Sergio Durigan Junior on 2020-06-23
- 7d6740d... by Sergio Durigan Junior on 2020-06-19
Will look at this tomorrow.