Marcelo Ricardo Leitner f01bfaea62 sctp: validate from_addr_param return
[ Upstream commit 0c5dc070ff3d6246d22ddd931f23a6266249e3db ]

Ilja reported that, simply putting it, nothing was validating that
from_addr_param functions were operating on initialized memory. That is,
the parameter itself was being validated by sctp_walk_params, but it
doesn't check for types and their specific sizes and it could be a 0-length
one, causing from_addr_param to potentially work over the next parameter or
even uninitialized memory.

The fix here is to, in all calls to from_addr_param, check if enough space
is there for the wanted IP address type.

Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-20 16:17:45 +02:00
..
2017-07-11 06:08:58 -04:00
2021-06-10 12:43:51 +02:00
2019-06-17 19:52:44 +02:00
2019-03-23 14:35:16 +01:00
2019-02-23 09:06:44 +01:00
2017-08-31 14:42:19 -07:00
2019-11-10 11:25:37 +01:00
2020-07-22 09:22:19 +02:00
2019-11-20 17:59:59 +01:00
2018-05-16 10:10:23 +02:00