Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.12.2] Regression in 1.8.4 related to OpenOS exception handling #3727

Open
RealityAnomaly opened this issue Jul 20, 2024 · 4 comments
Open
Labels
help needed Seeking help from the community - reproduction notes, debugging, etc.

Comments

@RealityAnomaly
Copy link

In 1.8.4, when I cause an exception to be thrown in OpenOS, occasionally the console will be spammed with text, which boils down to the following error: /lib/process.lua:63: in function </lib/process.lua:59>attempt to yield across a C-call boundary.

image

This does not happen in 1.8.3, but it requires a fresh install of OpenOS, for unknown reasons. This commit 9d4f7ea looks potentially suspicious as a cause for the problem as it was introduced in 1.8.4.

@ff66theone
Copy link
Contributor

I agree with you. It is certainly caused by resolving GHSA-54j4-xpgj-cq4g, after all it is something solved in OC 1.8.4 and it affected also pcall / xpcall. Knowing these functions are used for error handling, it wouldn't surprise me if it was the cause, but the problem is that it resolved a security issue allowing to DDoS a server by throwing an exception...

@ff66theone
Copy link
Contributor

And also, can you tell me a bit more about the circumstances (MC version, progamm running...), so I can attempt to reproduce ?

@asiekierka asiekierka added the help needed Seeking help from the community - reproduction notes, debugging, etc. label Jan 5, 2025
@asiekierka
Copy link
Contributor

I'm going to need a reproduction case.

@kcinnaJlol
Copy link

the following (as a standalone script) reproduces a similar issue, however here the error loop is caused by a yield in a call to gpu.copy, not gpu.set (as in the original error)
additionally, the error loop stops after a while

local function explode()
  error(("\n"):rep(100))
end

local magicTable = setmetatable({}, {
    __tostring = explode,
})
tostring(magicTable)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help needed Seeking help from the community - reproduction notes, debugging, etc.
Projects
None yet
Development

No branches or pull requests

4 participants