CVE-2022-35978

Post Reply
Other_Cody
Member
Posts: 51
Joined: Wed May 08, 2019 23:25
In-game: Other_Cody

CVE-2022-35978

by Other_Cody » Post

https://cve.mitre.org/cgi-bin/cvename.c ... 2022-35978
Minetest is a free open-source voxel game engine with easy modding and game creation. In **single player**, a mod can set a global setting that controls the Lua script loaded to display the main menu. The script is then loaded as soon as the game session is exited. The Lua environment the menu runs in is not sandboxed and can directly interfere with the user's system. There are currently no known workarounds.
Is this still a problem?

https://github.com/minetest/minetest/se ... -pcjw-27cc

What version can the security patch be backported to or used in? Any or only those under some version?

https://github.com/minetest/minetest/co ... 25d141ca13

And what version was this first patched into, if any?
For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.

User avatar
rubenwardy
Moderator
Posts: 7082
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: London, United Kingdom
Contact:

Re: CVE-2022-35978

by rubenwardy » Post

The source of this is https://github.com/minetest/minetest/se ... -pcjw-27cc

That page says:

Affected versions: <=5.5.1
Patched versions: 5.6.0
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

Other_Cody
Member
Posts: 51
Joined: Wed May 08, 2019 23:25
In-game: Other_Cody

Re: CVE-2022-35978

by Other_Cody » Post

rubenwardy wrote:
Sun Feb 25, 2024 21:41
The source of this is https://github.com/minetest/minetest/se ... -pcjw-27cc

That page says:

Affected versions: <=5.5.1
Patched versions: 5.6.0
Thank you for that information.

I do not yet know if the patch has been backported into Minetest 5.4.1 on Trisquel or 5.3.0 on Hyperbola yet.

Or if anyone can apply the patch to those versions.

https://trisquel.info/en/forum/does-tri ... test-patch

https://forums.hyperbola.info/viewtopic ... 7706#p7706

I only saw
apt-get source minetest
Reading package lists... Done
NOTICE: 'minetest' packaging is maintained in the 'Git' version control system at:
https://salsa.debian.org/games-team/minetest.git
Please use:
git clone https://salsa.debian.org/games-team/minetest.git
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 13.6 MB of source archives.
Get:1 https://archive.trisquel.org/trisquel aramo/main minetest 5.4.1+repack-2build1 (dsc) [2,731 B]
Get:2 https://archive.trisquel.org/trisquel aramo/main minetest 5.4.1+repack-2build1 (tar) [13.5 MB]
Get:3 https://archive.trisquel.org/trisquel aramo/main minetest 5.4.1+repack-2build1 (diff) [38.5 kB]
Fetched 13.6 MB in 4s (3,221 kB/s)
dpkg-source: info: extracting minetest in minetest-5.4.1+repack
dpkg-source: info: unpacking minetest_5.4.1+repack.orig.tar.gz
dpkg-source: info: unpacking minetest_5.4.1+repack-2build1.debian.tar.xz
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: applying kfreebsd-gettext.patch
dpkg-source: info: applying shared_mods.patch
dpkg-source: info: applying rawlua.patch
dpkg-source: info: applying postgresql.patch
dpkg-source: info: applying fix_typos.patch
dpkg-source: info: applying gcc_11.patch
on Trisquel.
For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.

User avatar
rubenwardy
Moderator
Posts: 7082
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: London, United Kingdom
Contact:

Re: CVE-2022-35978

by rubenwardy » Post

Other_Cody wrote:
Sun Feb 25, 2024 22:30
I do not yet know if the patch has been backported into Minetest 5.4.1 on Trisquel or 5.3.0 on Hyperbola yet.
That's the risk of using incredibly outdated versions. I'd also suggest that you don't use a distro that doesn't monitor CVEs. 5.3.0 also has remote execution vulnerabilities, see the security advisory list on our GitHub
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

Other_Cody
Member
Posts: 51
Joined: Wed May 08, 2019 23:25
In-game: Other_Cody

Re: CVE-2022-35978

by Other_Cody » Post

rubenwardy wrote:
Sun Feb 25, 2024 22:33
Other_Cody wrote:
Sun Feb 25, 2024 22:30
I do not yet know if the patch has been backported into Minetest 5.4.1 on Trisquel or 5.3.0 on Hyperbola yet.
That's the risk of using incredibly outdated versions. I'd also suggest that you don't use a distro that doesn't monitor CVEs. 5.3.0 also has remote execution vulnerabilities, see the security advisory list on our GitHub
Thank you for the

https://github.com/minetest/minetest/security

information.

https://forums.hyperbola.info/viewtopic ... 7707#p7707

shows
We were contacted by people from Minetest-development and pointed out that we do not integrate corporate software-projects (zstd). Also it was ponted out that we should update as soon as possible towards 5.8.0 - therefore our statement towards corporate software. Nevertheless we are looking into possible improvements for our minetest-version provided and therefore also further patches.

To underline: We are using Debian-patchsets for exactly this reasoning as our version of minetest has already patches for ...

CVE-2022-24301
CVE-2022-24300
I think Hyperbola does monitor CVEs, and likely also Trisquel.

Though I do not know what security patchs are in Trisquel, or if the patches can be used from the Debian-patchsets for versions without zstd as Microsoft's Asymmetric numeral systems patent may or may not also be in that.

I see these patches in Trisquel
apt-get source minetest
Reading package lists... Done
NOTICE: 'minetest' packaging is maintained in the 'Git' version control system at:
https://salsa.debian.org/games-team/minetest.git
Please use:
git clone https://salsa.debian.org/games-team/minetest.git
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 13.6 MB of source archives.
Get:1 https://archive.trisquel.org/trisquel aramo/main minetest 5.4.1+repack-2build1 (dsc) [2,731 B]
Get:2 https://archive.trisquel.org/trisquel aramo/main minetest 5.4.1+repack-2build1 (tar) [13.5 MB]
Get:3 https://archive.trisquel.org/trisquel aramo/main minetest 5.4.1+repack-2build1 (diff) [38.5 kB]
Fetched 13.6 MB in 4s (3,296 kB/s)
dpkg-source: info: extracting minetest in minetest-5.4.1+repack
dpkg-source: info: unpacking minetest_5.4.1+repack.orig.tar.gz
dpkg-source: info: unpacking minetest_5.4.1+repack-2build1.debian.tar.xz
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: applying kfreebsd-gettext.patch
dpkg-source: info: applying shared_mods.patch
dpkg-source: info: applying rawlua.patch
dpkg-source: info: applying postgresql.patch
dpkg-source: info: applying fix_typos.patch
dpkg-source: info: applying gcc_11.patch
viewtopic.php?p=432764#p432764

I do not know if the Microsoft patent that may be in some ZSTD versions or other reasons is why some people do not wish to use ZSTD as those who use it may be sued by Microsoft, though I'm not a lawyer so I do not know.

https://trisquel.info/en/forum/there-as ... ems-patent

https://wiki.hyperbola.info/doku.php?id ... y_software
For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.

User avatar
Blockhead
Moderator
Posts: 2849
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: CVE-2022-35978

by Blockhead » Post

As rubenwardy pointed out, Minetest's security notices have a central source at the GitHub security page. That includes patch commits for each issue. So it shouldn't be difficult to backport those fixes. But the patches automatically in there if your distro just updates to 5.9.0. Actually, the latest version mentioned in a security notice as of writing was CVE-2022-35978 which OP mentioned, which was fixed in 5.6.0

I think any excuse about zstd is bogus, because it's available and packaged in free-software-only distros already. zstd is under a free software licence (dual-licensed actually and both GPL and BSD are free licences). Nor did I find any actual evidence of a patent in my prior investigation. Trisquel 11 'aramo' actually has a zstd package. Guix, another entirely free-software package repository/distro has zstd.

As for the rANS patent, that's news to me, but professional opinions given to The Register seem to disagree that it's important. And if there's a patent dispute, it will be between Meta Systems ("Facebook") and Microsoft, and hopefully not affect free software in the dispute - I may be naïve. As referenced on the ANS Wikipedia page, Microsoft DirectStorage seems to use an rANS algorithm. I would suggest the patent is there to obstruct others from using a reimplementation of DirectStorage more than to harass others like Meta over zstd.

So I don't think it's about zstd. What's more likely is the Trisquel maintainers aren't keeping up to date with Minetest versions and security notices. Anyone packaging Minetest should be subscribed to the security updates provided. Of course, Trisquel's maintainers might have a problem with that given they're published on the proprietary GitHub.

A proper package maintainer of a stable distro won't update the program version, but they should be keeping up with security notices and applying patches to resolve security issues like those listed in CVEs.

My distro, Debian 12 "Bookworm" comes with 5.6.1, which is up to date against the latest published notices without needing any patches. The current oldstable version "Bullseye" packages Minetest 5.3. I downloaded the source code and it hasn't been patched against CVE-2022-35978.

Trisquel, which is based on Ubuntu, currently offers Minetest 5.4.1. This would have been packaged by the Debian Games team, passed through I think unmodified from Ubuntu, and is now available in the Trisquel package mirrors. If there were any security patches to apply to 5.4.1, they would have to come from Ubuntu, as Debian's LTS versions went straight from 5.3 to 5.6, and 5.3 is to this day unpatched. A glance at the source of Ubuntu 22.04's package of Minetest seems to leave it also vulnerable to CVE-2022-35978, as did the source of the Trisquel package.

Really, it is quite a mess given Trisquel is 2 steps away from Debian. I have made some effort to check what is out there, but you can verify for yourself what your distribution' package's source code is with apt source minetest (please also check the subdirectory debian/patches as those are applied to the package when it's built, while the main source code is left unmodified from upstream).

It is thankfully easy to patch a system. The security advisory points to the commit which fixed it, and it is relatively small. It should be backportable by anyone who can update the C++ source code correctly, with minimal actual C++ knowledge.

If your distribution is affected, you can report it to the maintainers with your distro's normal bug report tools, like Debian's reportbug. There are some processes about creating patches that package maintainers are used to but the average user doesn't really understand. You can submit a diff file to the maintainers that they should be able to sort out and add to their patch set.

Personally, this is just another good reason in my view to build from source or use the Minetest Developers Ubuntu PPA. Stay safe out there.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

Other_Cody
Member
Posts: 51
Joined: Wed May 08, 2019 23:25
In-game: Other_Cody

Re: CVE-2022-35978

by Other_Cody » Post

Blockhead wrote:
Mon Feb 26, 2024 07:47
It is thankfully easy to patch a system. The security advisory points to the commit which fixed it, and it is relatively small. It should be backportable by anyone who can update the C++ source code correctly, with minimal actual C++ knowledge.

If your distribution is affected, you can report it to the maintainers with your distro's normal bug report tools, like Debian's reportbug. There are some processes about creating patches that package maintainers are used to but the average user doesn't really understand. You can submit a diff file to the maintainers that they should be able to sort out and add to their patch set.
https://forums.hyperbola.info/viewtopic ... 7717#p7717

shows in part throgh from Hyperbola text of
As final statement ... yes, I managed to backport the patch.
You can read more about it there.

So a backported patch may have been found for Hyperbola's Minetest.

Maybe it can also work for Trisquel's Minetest.

Trisquel and Hyperbola also have

https://gitlab.trisquel.org/groups/trisquel/-/issues

and

https://issues.hyperbola.info/

to report issues at.

Hopefully the "average user" can also find ways to backport a patch, if those users wish to stay at a version without updating any "gameplay" or "engine" parts, as changes are also likely added to later versions, that may not make a game or engine that also work the same way.

In-case those "average users" do not wish to just use whatever is provided by "upstream" but use a forked version, to use features that may be found in older versions, but not found in later Versions.

I think fall damage was changed in a version of minetest, as at the time I think it was partly in the engine. I do not remember what version that was though.

Hopefully the "average users" can easily understand all the software they use. And not just pull the most new versions.
Or blindly downloading code, from any source, and afterwards running it without understanding what it does.
As I saw a later version of glibc, may have a vulnerability, that older versions may not have in them.

https://cve.mitre.org/cgi-bin/cvename.c ... -2023-6779
https://nvd.nist.gov/vuln/detail/CVE-2023-6779

https://cve.mitre.org/cgi-bin/cvename.c ... -2023-6780
https://nvd.nist.gov/vuln/detail/CVE-2023-6780

https://forums.hyperbola.info/viewtopic.php?id=1018

https://trisquel.info/en/forum/glibc-vu ... r-versions

https://blog.qualys.com/vulnerabilities ... rys-syslog

shows in part.
For the first vulnerability (CVE-2023-6246), a significant security flaw has been identified in the GNU C Library’s __vsyslog_internal() function, affecting syslog() and vsyslog(). This heap-based buffer overflow vulnerability was inadvertently introduced in glibc 2.37 (August 2022) and subsequently backported to glibc 2.36 while addressing a different, less severe vulnerability (CVE-2022-39046). Major Linux distributions like Debian (versions 12 and 13), Ubuntu (23.04 and 23.10), and Fedora (37 to 39) are confirmed to be vulnerable. This flaw allows local privilege escalation, enabling an unprivileged user to gain full root access, as demonstrated in Fedora 38.
For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest