Bug 1201974 (CVE-2021-41556) - VUL-0: CVE-2021-41556: squirrel: Out-of-bounds read
Summary: VUL-0: CVE-2021-41556: squirrel: Out-of-bounds read
Status: RESOLVED FIXED
Alias: CVE-2021-41556
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Minor
Target Milestone: ---
Assignee: Wolfgang Engel
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/338492/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-29 07:27 UTC by Cathy Hu
Modified: 2024-05-24 10:41 UTC (History)
4 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cathy Hu 2022-07-29 07:27:12 UTC
CVE-2021-41556

sqclass.cpp in Squirrel through 2.2.5 and 3.x through 3.1 allows an
out-of-bounds read (in the core interpreter) that can lead to Code Execution. If
a victim executes an attacker-controlled squirrel script, it is possible for the
attacker to break out of the squirrel script sandbox even if all dangerous
functionality such as File System functions has been disabled. An attacker might
abuse this bug to target (for example) Cloud services that allow customization
via SquirrelScripts, or distribute malware through video games that embed a
Squirrel Engine.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-41556
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-41556
https://github.com/albertodemichelis/squirrel/commit/23a0620658714b996d20da3d4dd1a0dcf9b0bd98
http://www.squirrel-lang.org/#download
https://blog.sonarsource.com/squirrel-vm-sandbox-escape/
Comment 1 Cathy Hu 2022-07-29 07:28:09 UTC
Affected:
- openSUSE:Backports:SLE-15-SP3/squirrel  3.0.7
- openSUSE:Backports:SLE-15-SP4/squirrel  3.0.7
- openSUSE:Factory/squirrel               3.0.7
Comment 3 OBSbugzilla Bot 2023-01-13 12:05:02 UTC
This is an autogenerated message for OBS integration:
This bug (1201974) was mentioned in
https://build.opensuse.org/request/show/1058212 Factory / squirrel
Comment 4 Lars Vogdt 2023-03-16 08:36:12 UTC
Wolfgang, can you please copy the Factory package to the Backport repositories mentioned by Hu in comment#1 ?
That should fix the problem for PackageHub.
Comment 5 Wolfgang Engel 2023-03-16 14:22:08 UTC
I created two maintenance requests for updating squirrel in openSUSE:Backports:SLE-15-SP3:Update and openSUSE:Backports:SLE-15-SP4:Update
It was already updated in openSUSE:Backports:SLE-15-SP5
Comment 6 OBSbugzilla Bot 2023-03-16 14:55:02 UTC
This is an autogenerated message for OBS integration:
This bug (1201974) was mentioned in
https://build.opensuse.org/request/show/1072379 Backports:SLE-15-SP4 / squirrel
Comment 7 Adam Majer 2023-03-20 11:27:07 UTC
Just to repeat what I wrote in the submit request for SP4...

Looks like upstream doesn't really care much about ABI stability between versions here. Since this package includes a -devel package, the patch probably should be backported for SP4, as it looks simple enough.

The ABI changes here should include SONAME change (SOVER increase) since old code will just *not* run with the new library.

The following is a small sample looking at the header diff from the -devel subpackage


< SQUIRREL_API SQRESULT sq_getclosureinfo(HSQUIRRELVM v,SQInteger idx,SQUnsignedInteger *nparams,SQUnsignedInteger *nfreevars);
---
> SQUIRREL_API SQRESULT sq_getclosureinfo(HSQUIRRELVM v,SQInteger idx,SQInteger *nparams,SQInteger *nfreevars);
Comment 8 Adam Majer 2023-03-20 11:51:12 UTC
SP4 backport fix submitted in https://build.opensuse.org/request/show/1073131
Comment 9 Swamp Workflow Management 2023-03-23 20:05:27 UTC
openSUSE-SU-2023:0080-1: An update that fixes one vulnerability is now available.

Category: security (moderate)
Bug References: 1201974
CVE References: CVE-2021-41556
JIRA References: 
Sources used:
openSUSE Backports SLE-15-SP4 (src):    squirrel-3.0.7-bp154.3.3.1
Comment 10 Alexander Bergmann 2024-05-24 10:41:11 UTC
Closing bug.