Name |
Last commit
|
Last update |
---|---|---|
.. | ||
auth.c | ||
auth.h | ||
auth_negotiate.c | ||
auth_negotiate.h | ||
cred.c | ||
cred.h | ||
cred_helpers.c | ||
git.c | ||
http.c | ||
http.h | ||
local.c | ||
smart.c | ||
smart.h | ||
smart_pkt.c | ||
smart_protocol.c | ||
ssh.c | ||
ssh.h | ||
winhttp.c |
When parsing OK packets, we copy any information after the initial "ok " prefix into the resulting packet. As newlines act as packet boundaries, we also strip the trailing newline if there is any. We do not check whether there is any data left after the initial "ok " prefix though, which leads to a pointer overflow in that case as `len == 0`: if (line[len - 1] == '\n') --len; This out-of-bounds read is a rather useless gadget, as we can only deduce whether at some offset there is a newline character. In case there accidentally is one, we overflow `len` to `SIZE_MAX` and then write a NUL byte into an array indexed by it: pkt->ref[len] = '\0'; Again, this doesn't seem like something that's possible to be exploited in any meaningful way, but it may surely lead to inconsistencies or DoS. Fix the issue by checking whether there is any trailing data after the packet prefix.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
auth.c | Loading commit data... | |
auth.h | Loading commit data... | |
auth_negotiate.c | Loading commit data... | |
auth_negotiate.h | Loading commit data... | |
cred.c | Loading commit data... | |
cred.h | Loading commit data... | |
cred_helpers.c | Loading commit data... | |
git.c | Loading commit data... | |
http.c | Loading commit data... | |
http.h | Loading commit data... | |
local.c | Loading commit data... | |
smart.c | Loading commit data... | |
smart.h | Loading commit data... | |
smart_pkt.c | Loading commit data... | |
smart_protocol.c | Loading commit data... | |
ssh.c | Loading commit data... | |
ssh.h | Loading commit data... | |
winhttp.c | Loading commit data... |