-
Notifications
You must be signed in to change notification settings - Fork 254
lib/utmp.c: prepare_utmp(): Fix buffer overrun when 'line' isn't "tty*" #1297
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
Conversation
f0c6249 to
e65c252
Compare
|
@Karlson2k Do you have a system where this bug is reproducible? |
Sometimes, line may be a string of length less than 3, in which case the +3 was jumping somewhere after the terminating null byte. This is probably not easy to exploit, as we only read at most 4 bytes, but this was theoretically quite bad. Fixes: 7fb1063 (2009-04-22; "* libmisc/utmp.c: The ut argument of prepare_utmp() might be NULL. ut_id needs to be forged in that case.") Reported-by: Evgeny Grin (Karlson2k) <k2k@drgrin.dev> Signed-off-by: Alejandro Colomar <alx@kernel.org>
No. It would be nice to pick my patch for this issue. |
If you write it with Also, please open a separate PR for the second patch. We can only merge via github, which doesn't allow picking. |
Done. |
Nope; we can't push manually to |
|
Merged @Karlson2k 's equivalent patch in #1301 . |
Reported-by: @Karlson2k