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.

A Crack in the Linux Firewall

264 pointsby emilburzoalmost 3 years ago

9 comments

iam-TJalmost 3 years ago
The proof of concept (PoC) itself relies on &#x2F;tmp&#x2F; having mount &#x27;exec&#x27; permissions. On systems with a separate &#x2F;tmp&#x2F; and mounted with &#x27;noexec&#x27; this would fail. This latter is one of a series of hardening steps that are useful in making executing untrusted code more difficult (but not impossible).<p>Fix is introduced in commit 7e6bc1f6cabcd30aba0b11219d8e01b952eacbb6. On the wider point of kernel corruption it isn&#x27;t absolutely clear if the PoC relies on specific attributes of the target kernel builds or a suitable .config, and if so which, or very specific kernel versions between v4.1-rc1 and v5.19-rc7.<p>Article talks specifically about &quot;Ubuntu 22.04&quot; and shows kernel 5.15.0-27-generic in the poc.gif but the github README.md says 5.15.0-39-generic. No mention if this affects the -lowlatency kernels.<p>Recent Linux stable tree kernels carry the patch (e.g. v5.18.12 commit 6b7488071ea8ed6265a39afebd5a5920f6975d02).<p>The exploit fails (here) on stable tree v5.18.9 in an interesting way!<p><pre><code> $ .&#x2F;poc [+] Second process currently waiting [+] Get CAP_NET_ADMIN capability [+] Netlink socket created [+] Netlink socket bound [+] Table table created [+] Set for the leak created [+] Set for write primitive created [*] Leak in process[-] add_key: Disk quota exceeded </code></pre> This on an ext4 file-system with no quotas enabled and 9GiB free space.<p>The message via perror() is of course wrong; in fact during the call via SYSCALL_DEFINES(add_key, ...) in security&#x2F;keys&#x2F;keyctl.c a return value of 122 (EDQUOT) is returned. There are 3 call sites in that function that call PTR_ERR() - a function that determines if a pointer value is a valid &#x27;errno&#x27; value - so one of strndup_user(), lookup_user_key(), or key_create_or_update() failed.
评论 #32181591 未加载
oaieyalmost 3 years ago
To my very humble reading you need local system (non-root) access first. So no exploitation over the networking interface themselves.<p>Disclaimer: Not a hacker, not an Linux pro.
评论 #32178785 未加载
评论 #32184614 未加载
评论 #32190381 未加载
评论 #32178781 未加载
评论 #32178459 未加载
评论 #32178656 未加载
aorthalmost 3 years ago
Wow! If I understand correctly this is a local privilege escalation (the blog post doesn&#x27;t mention &quot;local&quot; or &quot;remote&quot;). But it seems it could also be used to get remote code execution?<p>I wish there was a list of distribution kernels that are vulnerable and which have already patched this. Would be valuable to add to the blog post and the GitHub repo. <a href="https:&#x2F;&#x2F;github.com&#x2F;randorisec&#x2F;CVE-2022-34918-LPE-PoC" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;randorisec&#x2F;CVE-2022-34918-LPE-PoC</a>
评论 #32178456 未加载
badrabbitalmost 3 years ago
My understanding is you need CAP_NET_ADMIN first right? Which is enabled by default for an interactive user on Ubuntu. But is it enabled for say www-data? If I pop a shell on wordpress for example, I would need to compromise another account with that capability right? Or is CAP_NET_ADMIN enabled for non-interactive system users or not required for this LPE?
评论 #32178713 未加载
评论 #32178968 未加载
linsomniacalmost 3 years ago
TL;DR: Local privileges escalation in iptables on Ubuntu 22.04 and RHEL 9.<p><a href="https:&#x2F;&#x2F;cve.mitre.org&#x2F;cgi-bin&#x2F;cvename.cgi?name=CVE-2022-34918" rel="nofollow">https:&#x2F;&#x2F;cve.mitre.org&#x2F;cgi-bin&#x2F;cvename.cgi?name=CVE-2022-3491...</a><p><a href="https:&#x2F;&#x2F;access.redhat.com&#x2F;security&#x2F;cve&#x2F;cve-2022-34918" rel="nofollow">https:&#x2F;&#x2F;access.redhat.com&#x2F;security&#x2F;cve&#x2F;cve-2022-34918</a>
jvealmost 3 years ago
Speaking about iptables - is there anything in the wild that allows users make request to web port and I can approve&#x2F;deny particular requests?<p>For example, 443&#x2F;TCP is blocked from world. However if someone opens web page, it returns &lt;html&gt;&lt;body&gt;Access request from IP xxx.xxx.xxx.xxx has been submitted&lt;&#x2F;body&gt;&lt;&#x2F;html&gt; (or maybe a form where you put port number you&#x27;d like to access) and from server-side I can somehow see those requests, useragents and accept&#x2F;deny and just ignore bots.<p>Use-case: Some photoalbum is locked down, accessed by particular IPs&#x2F;countries&#x2F;vpn (to reduce or prevent bruteforcing, automated hacking and such) - however I&#x27;d like to give access to someone (who doesn&#x27;t know his IP) by just giving him a domain name. <a href="https:&#x2F;&#x2F;photos.example.com" rel="nofollow">https:&#x2F;&#x2F;photos.example.com</a> - yeah, he sees that unfriendly page. After a while I call him and say - try again and poof, next time he opens the page, he penetrates the firewall and gets pictures.<p>The thing is:<p>- VPN is too much of an ask to a person I want to send a link to some data<p>- Country block is very rough filter, just helps to reduce some log traffic from uninteresting countries with loads of bots.<p>- Asking person his IP is very manual: &quot;please open&#x2F;google up such phrase, send me that address and I&#x27;ll look up my notes to copy&#x2F;paste that iptables command and I&#x27;ll modify it slightly (or add some config entry to .htaccess) to put your IP in and then you&#x27;ll have access until you reconnect to your mobile network or your ISP gives you new DHCP address and then we&#x27;ll repeat&quot;<p>&quot;Knockwall&quot; doesn&#x27;t return much results, eh.
评论 #32178904 未加载
评论 #32178906 未加载
评论 #32178778 未加载
评论 #32179177 未加载
评论 #32178847 未加载
评论 #32178822 未加载
评论 #32178708 未加载
评论 #32178777 未加载
评论 #32179129 未加载
评论 #32178798 未加载
评论 #32178996 未加载
评论 #32178955 未加载
评论 #32179701 未加载
评论 #32178718 未加载
评论 #32178717 未加载
nukeralmost 3 years ago
&gt; This vulnerability could be exploited to get a privilege escalation on Ubuntu 22.04.<p>Nothing else is vulnerable?
评论 #32178270 未加载
评论 #32178555 未加载
评论 #32181740 未加载
claudiojulioalmost 3 years ago
Will the fix only be available in kernel 5.19?
评论 #32179462 未加载
anewpersonalityalmost 3 years ago
A rustOS can&#x27;t come soon enough!