Re: ber.c: Don't continue on nonexistent ber

2019-08-13 Thread Martijn van Duren
I found two issues related to this diff. 1) I posted a fix[0] for this one. 2) We can skip a NULL-ber on ')' and '}' since we replace it with a parent ber. There's only regress tests for ldapd and snmpd, so those are all I tested. martijn@ [0] https://marc.info/?l=openbsd-tech&m=1565708032308

Re: ber.c: Don't continue on nonexistent ber

2019-08-13 Thread Claudio Jeker
On Tue, Aug 13, 2019 at 03:27:17PM +0200, Martijn van Duren wrote: > I managed to make snmp(1) crash, when I sent a malformed snmp packet. > Specifically when I have a varbind with an oid, but no value. > > I test for this case via ber_scanf_elements("{oS}", which presumably > would crap out if my

ber.c: Don't continue on nonexistent ber

2019-08-13 Thread Martijn van Duren
I managed to make snmp(1) crash, when I sent a malformed snmp packet. Specifically when I have a varbind with an oid, but no value. I test for this case via ber_scanf_elements("{oS}", which presumably would crap out if my skip doesn't have an element. Unfortunately reality is that the be_next is s