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

setmetamode: use unsigned int type for KDGKBMETA / KDSKBMETA #16

Closed
wants to merge 1 commit into from
Closed

setmetamode: use unsigned int type for KDGKBMETA / KDSKBMETA #16

wants to merge 1 commit into from

Conversation

andhe
Copy link
Contributor

@andhe andhe commented May 28, 2018

alsauser@pragmasoft.com reported that he detected a stack smash
and analyzed the problem as allocating too little space for
the resulting put_user after calling ioctl KDGKBMETA.
The ometa variable should be defined as unsigned int.

While at it and for correctness, also nmeta and thus the
val member of the struct meta where changed to unsigned
int as it seems the kernel wants to take this type
(but should be harmless to use char).

Original bug report at https://bugs.debian.org/872623

alsauser@pragmasoft.com reported that he detected a stack smash
and analyzed the problem as allocating too little space for
the resulting put_user after calling ioctl KDGKBMETA.
The ometa variable should be defined as unsigned int.

While at it and for correctness, also nmeta and thus the
val member of the struct meta where changed to unsigned
int as it seems the kernel wants to take this type
(but should be harmless to use char).

Original bug report at https://bugs.debian.org/872623
@legionus
Copy link
Owner

Good catch! Merged. Thanks!

@legionus legionus closed this May 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants