3575235d62fa242d9a650ee54425f42b19533cb0 |
|
28-Aug-2013 |
Pavel Březina <pbrezina@redhat.com> |
sss_packet_grow: correctly pad packet length to 512B
https://fedorahosted.org/sssd/ticket/2059
If len % SSSSRV_PACKET_MEM_SIZE == 0 or some low number,
we can end up with totlen < len and return EINVAL.
It also does not pad the length, but usually allocates
much more memory than is desired.
len = 1024
n = 1024 % 512 + 1 = 0 + 1 = 1
totlen = 1 * 512 = 512
=> totlen < len
len = 511
n = 511 % 512 + 1 = 511 + 1
totlen = 512 * 512 = 262144
totlen is way bigger than it was supposed to be |
a52eb1f0635282a7851b2f2b23a4d6a26eab37ce |
|
02-Nov-2011 |
Stephen Gallagher <sgallagh@redhat.com> |
RESPONDER: Fix segfault in sss_packet_send()
There are several places (all error-handling) where sss_cmd_done()
is called with no response packet created. As a short-term
solution, we need to check whether the packet is NULL and simply
return EINVAL. client_send() (the consumer) will then forcibly
disconnect the client (which will return PAM_SYSTEM_ERR to the
client). |