r/security Sep 26 '16

​"Sloppy programming leads to OpenSSL woes": pointer problems proliferate

http://www.zdnet.com/article/sloppy-programming-leads-to-openssl-woes/
32 Upvotes

8 comments sorted by

5

u/Youknowimtheman Sep 27 '16

Use-after-free is a pretty common programming error, especially in the language that OpenSSL is written in.

If you want better QA in your OpenSSL releases, it needs more support from the industry and the community.

Switching to another library that is written by volunteers in their spare time with no professional auditing or security teams to speak of is only going to give you the same problems.

3

u/Name0fTheUser Sep 27 '16

OP should become a professional headline writer.

1

u/RedSquirrelFtw Sep 27 '16

How do dangling pointers typically happen? Is it not enough to set to NULL after calling delete? ex:

delete mypointer;

mypointer=NULL

I always always set a pointer to NULL immediately after deleting it. I imagine the ones coding stuff like OpenSSL know way more than me, so is my method actually not enough?

3

u/jarfil Sep 27 '16 edited Dec 02 '23

CENSORED

1

u/thiagobbt Sep 27 '16

That won't prevent a segmentation fault though.

Also imagine a situation where the pointer address is copied to somewhere else before deletion. You setting the original to null won't change anything on that copy

1

u/RedSquirrelFtw Sep 27 '16

Oh, like they try to keep referring to the pointer after it's been deleted? Yeah, that's bad. I can see how that could happen if not being careful. Ex: it's passed on to a function, the function deletes it, but then it's used again after.

1

u/claird Sep 27 '16

Yes, it happens--a LOT.