News for hackers. Stuff that matters.
Re:Althttpd: Simple webserver in a single C file by pjc50 on Tuesday June 08, 2021 @10:01AM (#27435320)
People say this, but then there's ASN.1 which has had critical security bugs in: https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=asn.1

I will agree that exhaustively defining text protocols is extremely hard, starting from character set / encoding and getting worse from there.

Re:Althttpd: Simple webserver in a single C file by lmilcin on Tuesday June 08, 2021 @11:44AM (#27436657)
ASN.1 is not a binary protocol. It is a language to describe messages.

Typically you create message description which is then compiled to code that can serialize/deserialize messages in BER-TLV or PER-TLV.

I know because I wrote a complete parser/serializer for BER-TLV. It is simple protocol and any security issue is in the parser/serializer and not the protocol itself. That for simple reason that the protocol is nothing more than a format to serialize/deserialize the data.

Re:Althttpd: Simple webserver in a single C file by lmz on Tuesday June 08, 2021 @07:33PM (#27442442)
True, but they certainly don't make it too easy either with the indefinite length constructs.
Re:Althttpd: Simple webserver in a single C file by admax88q on Tuesday June 08, 2021 @04:15PM (#27440182)
I guess if you're going to pick the absolute worst example of a binary protocol.
Re:Althttpd: Simple webserver in a single C file by lmilcin on Tuesday June 08, 2021 @05:06PM (#27440794)
That is absolutely not fair.

BER-TLV is really nice protocol. I have worked with it for couple of years when I worked on an EMV application. It uses BER-TLV to communicate with the credit card but it is also very convenient format for all sorts of other uses and I would use it wherever I could. Think of it as Json but in binary form. It is not complicated and I would not even bother parsing the messages -- I could interpret hex dumps of them by sight very easily.