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

Fix ksym buffer overflow on i386 #1660

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kolyshkin
Copy link
Contributor

@kolyshkin kolyshkin commented Jan 31, 2025

Commit 78074c5 ("info: expose more prog jited info"), which made its way into v0.17.0, resulted in random runc CI failures on i386 (see 1). In some cases it manifested in a panic or SIGSEGV, and in others we saw a slightly broken JSON, in which the first 4 bytes of a key were replaced with 0xff.

Changing uintptr (which is 32 bit) back to uint64 fixes the issue for runc. It changes the public API but I see no way around it (and the uintptr cast of uint64 which was there before does not look correct either).

Alas, I don't have a good reproducer, nor a unit test. For a rather complicated one, which I used to git bisect (first runc, then ebpf), also see 1 (I can provide more detailed steps if needed).

Commit 78074c5 ("info: expose more prog jited info"), which made its
way into v0.17.0, resulted in random runc CI failures on i386 (see [1]).
In some cases it manifested in a panic or SIGSEGV, and in others we saw
a slightly broken JSON, in which the first 4 bytes of a key were
replaced with 0xff byte.

Changing uintptr (which is 32 bit) back to uint64 fixes the issue for
runc. It changes the public API but I see no way around it (and the
uintptr cast of uint64 which was there before does not look correct
either).

Alas, I don't have a good reproducer, nor a unit test. For a rather
complicated one, see [1].

[1]: opencontainers/runc#4594

Signed-off-by: Kir Kolyshkin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Changes exported API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant