News for hackers. Stuff that matters.
Re:Authentication Vulnerabilities in OpenBSD by tptacek on Wednesday December 04, 2019 @05:18PM (#21707825)
Oh, wow, this is brutal. They're shelling out to a command line program to do authentication, and not catching the "-" metacharacter in the username they shell out with, so you can pass options to that program.
Re:Authentication Vulnerabilities in OpenBSD by kbenson on Wednesday December 04, 2019 @05:32PM (#21707959)
This feels like an old school vulnerability. Things like this were the norm in the 90's and early 2000's. It feels weird to see an exploit like this now in a large and well known project, and very weird for it to be in OpenBSD.

It just goes to show, as a user you can make informed choices in what software to use to reduce your security exposure, but that's not enough. You still need to pay attention to new problems that might pop up. No software is guaranteed to be safe in perpetuity.

Re:Authentication Vulnerabilities in OpenBSD by conradev on Wednesday December 04, 2019 @11:15PM (#21709930)
In a world where we harden all of the things and write code in memory safe languages maybe memory corruption will be the old school vulnerability and this type of thing will be all that is left
Re:Authentication Vulnerabilities in OpenBSD by anthk on Thursday December 05, 2019 @12:09AM (#21710133)
Ever heard of retguard? This is not an exploiting bug, this is a parsing bug. It could happen with Rust too.
Re:Authentication Vulnerabilities in OpenBSD by ben_bai on Thursday December 05, 2019 @08:32AM (#21712090)
Which is exactly what he wrote.
Re:Authentication Vulnerabilities in OpenBSD by saagarjha on Thursday December 05, 2019 @06:33AM (#21711563)
Why is retguard relevant here?
Re:Authentication Vulnerabilities in OpenBSD by ben_bai on Thursday December 05, 2019 @04:28PM (#21716761)
Yep, there will always be parsing bugs like not sanitizing input, logic failures, weak algorithms, timing attacks, ...
Re:Authentication Vulnerabilities in OpenBSD by akira2501 on Wednesday December 04, 2019 @05:30PM (#21707928)
That's why I like DBJs method. You still use a command line program, but you pass a filehandle that the authentication data can be read from.. this seems much safer than trying to parse and re-format that data as an intermediary. Also avoids any data leaks through the often unprotected 'cmdline'.

Is there some technical reason OpenBSD doesn't do this?

Re:Authentication Vulnerabilities in OpenBSD by jstewartmobile on Wednesday December 04, 2019 @07:12PM (#21708608)
Thank God for DJB. His entire website should be required reading for software developers.
Re:Authentication Vulnerabilities in OpenBSD by TheAceOfHearts on Thursday December 05, 2019 @05:04PM (#21717131)
Thanks for the recommendation, I'd previously heard of DJB but was unaware of his writings.

Here's the link to his website: https://cr.yp.to/djb.html

Re:Authentication Vulnerabilities in OpenBSD by skunkpocalypse on Wednesday December 04, 2019 @09:55PM (#21709588)
I am convinced that DJB is actually the reincarnation of John von Neumann.

Seriously, how many other people make contributions in areas ranging all the way from number theory to hand-written machine code?

Re:Authentication Vulnerabilities in OpenBSD by mjevans on Wednesday December 04, 2019 @06:17PM (#21708238)
Probably historic compatibility. If making a breaking change this might be a good time to implement a design benefiting from decades of real world experiences.
Re:Authentication Vulnerabilities in OpenBSD by anthk on Wednesday December 04, 2019 @07:31PM (#21708764)
That's literally what OpenBSD was doing over decades,

starting with binary compatibility

with Linux and a lot of legacy stuff

which came from NetBSD and BSD 4.4 lite/BSD 4.3.

You described OpenBSD with that comment.

- Xenocara with rootless privileges as a fork of X

- LibreSSL

- Linux compat going away

- Pledge/Unveil

- Some daemons belonging to ports

- HTTPD/SMTPD and so on as replacement of bloated daemons

- OpenSSH itself

- Retguard

This vulnerability is bad, but pledge

and unveil will have even

more prominent roles in base soon, so even

if you get privs, you can do either nil or just crash because of pledge.

Re:Authentication Vulnerabilities in OpenBSD by pnako on Thursday December 05, 2019 @12:14AM (#21710153)
Hu? Those vulnerabilities are authentication bypass and local privilege escalation; sandboxing like pledge is not going to help you at all there.
Re:Authentication Vulnerabilities in OpenBSD by anthk on Thursday December 05, 2019 @01:56AM (#21710484)
He was talking on innovation vs legacy cruft.
Re:Authentication Vulnerabilities in OpenBSD by k_sze on Wednesday December 04, 2019 @07:06PM (#21708550)
What does “DBJ” stand for?
Re:Authentication Vulnerabilities in OpenBSD by inferiorhuman on Wednesday December 04, 2019 @07:11PM (#21708600)
Daniel Bernstein, author of qmail, djbdns, and daemontools among others.
Re:Authentication Vulnerabilities in OpenBSD by k_sze on Wednesday December 04, 2019 @08:53PM (#21709274)
And where does that auth-info-via-file-handle come from? I did a bit of duckduckgoing and couldn’t spot anything about that.
Re:Authentication Vulnerabilities in OpenBSD by simtel20 on Wednesday December 04, 2019 @11:18PM (#21709946)
The qmail source code has this convention.
Re:Authentication Vulnerabilities in OpenBSD by k_sze on Thursday December 05, 2019 @12:14AM (#21710155)
Thanks!
Re:Authentication Vulnerabilities in OpenBSD by zdw on Thursday December 05, 2019 @09:44AM (#21712602)
Some call the concept "Bernstein Chaining": http://www.catb.org/%7Eesr/writings/taoup/html/ch06s06.html
Re:Authentication Vulnerabilities in OpenBSD by kick on Wednesday December 04, 2019 @08:07PM (#21709008)
That's DJB. DBJs is a Javascript database thing. There is possible ambiguity here.
Re:Authentication Vulnerabilities in OpenBSD by inferiorhuman on Thursday December 05, 2019 @12:30AM (#21710202)
Fair point. I associate DJB with security and coding best practices, Javascript not so much. I can only hope the comment I replied to meant DJB the person.
Re:Authentication Vulnerabilities in OpenBSD by kick on Thursday December 05, 2019 @12:52AM (#21710274)
I hope so too.
Re:Authentication Vulnerabilities in OpenBSD by pnako on Wednesday December 04, 2019 @10:07PM (#21709635)
DJ Bernstein, famous for remixing sendmail and similar hits in the 90s
Re:Authentication Vulnerabilities in OpenBSD by gautamcgoel on Wednesday December 04, 2019 @07:09PM (#21708581)
I think he means Daniel Bernstein, a prominent cryptographer and coder.
Re:Authentication Vulnerabilities in OpenBSD by asveikau on Wednesday December 04, 2019 @09:23PM (#21709412)
> They're shelling out to a command line program to do authentication

Interesting to track who exactly "they" might have been, as many commenters are saying this is uncharacteristic for OpenBSD.

Looking at the patch, the first OpenBSD commit of this file [1] is from 2000 and says "from BSDI" in the commit message, did fork()+execve() at that time, and the BSDI copyright comment says 1995-1997.

Probable to say more recent OpenBSD stuff is likely not written this way, but that they have baggage like this in the tree from earlier times.

[1] https://cvsweb.openbsd.org/src/lib/libc/gen/auth_subr.c?rev=...

Re:Authentication Vulnerabilities in OpenBSD by anthk on Wednesday December 04, 2019 @09:43PM (#21709531)
Al of the 3 BSD's can be traced back to 386BSD and before, 4.4 BSD.
Re:Authentication Vulnerabilities in OpenBSD by wahern on Wednesday December 04, 2019 @09:53PM (#21709580)
BSD Auth was designed by BSDi as an alternative to PAM. Only OpenBSD imported BSD Auth; NetBSD and FreeBSD went the PAM route.
Re:Authentication Vulnerabilities in OpenBSD by linusnext on Wednesday December 04, 2019 @09:39PM (#21709514)
There have been many bugs in NetBSD code that are found and fixed. Quite often these bugs are in code shared with OpenBSD, but you never see them list it as such, as they import said fixes from NetBSD.

edited: make verb plural.

Re:Authentication Vulnerabilities in OpenBSD by quotemstr on Wednesday December 04, 2019 @08:13PM (#21709059)
Yeah. It's a shame how few people invoking shell commands use tricks like "--" to suppress option parsing and "./*" to suppress bad globs. :-(
Re:Authentication Vulnerabilities in OpenBSD by linusnext on Wednesday December 04, 2019 @09:37PM (#21709496)
The marriage operator is always a source of fun like this. So named as it's the end of options, and the beginning of arguments.
Re:Authentication Vulnerabilities in OpenBSD by quotemstr on Wednesday December 04, 2019 @10:54PM (#21709846)
Brutal.
Re:Authentication Vulnerabilities in OpenBSD by fluffything on Wednesday December 04, 2019 @05:23PM (#21707869)
Yep, very cool.