TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Log4j 2.16: Certain strings can cause infinite recursion

226 pointsby scblznover 3 years ago

23 comments

garydgregoryover 3 years ago
We just released Log4j 2.17.0 which addresses this issue: <a href="https:&#x2F;&#x2F;logging.apache.org&#x2F;log4j&#x2F;2.x&#x2F;download.html" rel="nofollow">https:&#x2F;&#x2F;logging.apache.org&#x2F;log4j&#x2F;2.x&#x2F;download.html</a>
评论 #29603712 未加载
评论 #29613936 未加载
Freak_NLover 3 years ago
This looks worrying, but if you read the issue thread it seems that this can only be triggered if you can edit the pattern string of the logger. This is something you can only do on the server itself (if made configurable) or in the build artefact that you deploy.<p>From a quick glance at the comments this looks like a minor issue due to the attack vector being very, very small — i.e., the attacker must have access to where the logging pattern is defined, and if that is the case, this attack is probably not the most worrisome they could pull off.<p>I hope I&#x27;m not wrong, otherwise we&#x27;ll be patching everything again.
评论 #29603674 未加载
评论 #29605063 未加载
imglorpover 3 years ago
There&#x27;s a new CVE filed for it, just now. And here are the others for reference.<p>12&#x2F;18 - <a href="https:&#x2F;&#x2F;nvd.nist.gov&#x2F;vuln&#x2F;detail&#x2F;CVE-2021-45105" rel="nofollow">https:&#x2F;&#x2F;nvd.nist.gov&#x2F;vuln&#x2F;detail&#x2F;CVE-2021-45105</a> Score: -<p>12&#x2F;14 - <a href="https:&#x2F;&#x2F;nvd.nist.gov&#x2F;vuln&#x2F;detail&#x2F;CVE-2021-45046" rel="nofollow">https:&#x2F;&#x2F;nvd.nist.gov&#x2F;vuln&#x2F;detail&#x2F;CVE-2021-45046</a> Score: 3.7<p>12&#x2F;14 - <a href="https:&#x2F;&#x2F;nvd.nist.gov&#x2F;vuln&#x2F;detail&#x2F;CVE-2021-4104" rel="nofollow">https:&#x2F;&#x2F;nvd.nist.gov&#x2F;vuln&#x2F;detail&#x2F;CVE-2021-4104</a> Score: 8.1<p>12&#x2F;10 - <a href="https:&#x2F;&#x2F;nvd.nist.gov&#x2F;vuln&#x2F;detail&#x2F;CVE-2021-44228" rel="nofollow">https:&#x2F;&#x2F;nvd.nist.gov&#x2F;vuln&#x2F;detail&#x2F;CVE-2021-44228</a> Score: 10.0
评论 #29604700 未加载
评论 #29606252 未加载
keyleover 3 years ago
This is nothing surprising. I&#x27;m not talking about the bug, but the report.<p>If you shine a thousand spotlights at a problem, you&#x27;ll find more problems.<p>Glad this library is finally getting the code review it deserves. Hope the whole SDK gets the fine-tooth comb treatment it is overdue.<p>Like it or not... 50% of the Internet runs on Java (and my statistics are 50% accurate. I swear, 50% of the time.)
评论 #29604241 未加载
评论 #29605012 未加载
blastonicoover 3 years ago
Get away from languages like C, they said. There are double free, dangling pointer, undefined behavior, they said.<p>Wow, a LOGGER engine that execute arbitrary code. wow
评论 #29606022 未加载
评论 #29604935 未加载
评论 #29610964 未加载
评论 #29605903 未加载
评论 #29605660 未加载
hoffsover 3 years ago
The comments show that nobody can prove a reliable attack vector of DOS in 2.16
评论 #29603775 未加载
tomohawkover 3 years ago
The author of log4j abandoned it and wrote logback. That plus slf4j seem like a better path than sticking with log4j.
评论 #29606147 未加载
pdevrover 3 years ago
Avoid frameworks and libraries whenever possible.<p>The last time I benchmarked java.util.logging though, it lost out to log4j by a wide enough margin. Has anyone done any benchmarking lately?
评论 #29604004 未加载
评论 #29610977 未加载
throwaway4goodover 3 years ago
I like java.util.logging.
评论 #29604637 未加载
xg15over 3 years ago
So, let me get this: Log4j is disabling JNDI, fixing various string substitution issues and who knows what else, but the root cause of the whole mess - that Log4j attempts string substitution on the <i>actual parameter values</i> remains untouched? Why?
perfunctoryover 3 years ago
Reading stories like this makes me very sad about the state of my profession. Something that is supposed to be a simple stupid logging library is on the front pages of the mainstream media due to all the havoc it&#x27;s causing. We really have a long way to grow up as a profession.
评论 #29603866 未加载
评论 #29603834 未加载
hn_throwaway_99over 3 years ago
Perhaps I missed this, and I get there are backwards compatibility issues, but can&#x27;t a version ship where default is that the logged strings (not formatting strings) are not parsed <i>at all</i>. This seems like a major design flaw - I don&#x27;t want my logging library doing <i>any</i> parsing of the logged input.
jokoonover 3 years ago
Sometimes I wonder if it would be possible to estimate the probability of the presence of nasty vulnerabilities like this one on a software stack.<p>At one point, it seems that &quot;everyone use this so it must be secure enough&quot; replaced &quot;we&#x27;re a large company, did we spend enough time reviewing code of the open source stuff we use?&quot;.<p>It seems the Linus&#x27;s quote &quot;given enough eyeballs, all bugs are shallow&quot;, is not really true.<p>Imagine if a well funded agency like the NSA employed at least hundreds of full time developers whose job would be to sniff for those vulns. I&#x27;m pretty sure you could automate searching for those vulns, and that only the NSA has such tool.
评论 #29604295 未加载
评论 #29604328 未加载
评论 #29604283 未加载
评论 #29604794 未加载
stjohnswartsover 3 years ago
I wonder if this won&#x27;t be a boon for them in the long run. Lots of eyes on log4j security nowadays, it will come out stronger if with fewer users. I imagine a lot of user have switched to other logging solutions now or plan to in the near future.
sto_hristoover 3 years ago
Lets make a program that can print strings and do log rotation. Then overly complicate it, put everything in it. wcgw?
评论 #29604532 未加载
评论 #29606324 未加载
评论 #29603970 未加载
revskillover 3 years ago
One reason to adopt microservice architecture. Stop import logging library, and build a logging service instead.
评论 #29609493 未加载
throwbynight38over 3 years ago
<a href="http:&#x2F;&#x2F;www.slf4j.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.slf4j.org&#x2F;</a>
martini333over 3 years ago
The gift that keeps giving!
nafeyover 3 years ago
Feels like a bad comedy movie.
评论 #29603667 未加载
评论 #29603642 未加载
IsThisYouover 3 years ago
I still try to understand why anybody would want a logger that executes embedded code and loads remote code from aribtrary web urls. That&#x27;s like having a toaster that needs regular tire changes so it doesn&#x27;t run me over.
narengowdaover 3 years ago
Not again
wly_cdgrover 3 years ago
Do they just, like, not have a QA department over there? Have people really still not understood that they amount of resources spent on QA must be exponentially proportional to dependents count? And that QA, not software &quot;engineering&quot;, is the most important job that requires the most highly qualified people?
评论 #29606434 未加载
mnd999over 3 years ago
Three releases for essentially the same bug in a week is not okay. Just shut this project down. It’s seemingly a cesspit of bad code, bad testing and general incompetence.
评论 #29603998 未加载
评论 #29604228 未加载
评论 #29605100 未加载