Fix ksym buffer overflow on i386 #1660
Open
+3
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).