net/local: fix SCM_RIGHTS pointer and memory corruption - #19902
Open
Bogdan0759 wants to merge 1 commit into
Open
net/local: fix SCM_RIGHTS pointer and memory corruption#19902Bogdan0759 wants to merge 1 commit into
Bogdan0759 wants to merge 1 commit into
Conversation
xiaoxiang781216
approved these changes
Aug 20, 2026
Contributor
|
@Bogdan0759 please fix ci error: |
jerpelea
approved these changes
Aug 20, 2026
Bogdan0759
force-pushed
the
fix-scm-rights
branch
from
August 20, 2026 10:25
e8f9b3b to
34649a8
Compare
Author
Added |
jerpelea
requested changes
Aug 20, 2026
jerpelea
left a comment
Contributor
There was a problem hiding this comment.
please add a commit message describing the change
Fix NULL pointer dereference and memory corruption by using file_put() instead of file_close() + kmm_free(). Add peer NULL check to local_freectl(). Signed-off-by: Bogdan <Bogdan4ik0759@gmail.com>
Bogdan0759
force-pushed
the
fix-scm-rights
branch
from
August 20, 2026 10:49
34649a8 to
6114f46
Compare
Author
Done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fix NULL pointer dereference and fix memory corruption by using file_put() instead of file_close() + kmm_free().
Add peer NULL check to local_freectl().
Impact
Fixes kernel panic and memory corruption after recvmsg(SCM_RIGHTS).
Testing
Board: qemu_intel64:nsh
Tested with program that exhausts fd table and call recvmsg(SCM_RIGHTS).