[PATCH] networking: Fixed crash in ip neigh show.

Denys Vlasenko vda.linux at googlemail.com
Thu Feb 8 07:47:20 UTC 2018


Applied, thanks

On Thu, Feb 8, 2018 at 12:21 AM, Balaji Punnuru
<balaji.punnuru at gmail.com> wrote:
> Some times when running ip neigh show, and ip route show
> The corruption of buffer which happens randomly, since the the RTAttribute
> array is not intialized.
>
> Signed-off-by: Balaji Punnuru <balaji_punnuru at cable.comcast.com>
> ---
>  networking/libiproute/libnetlink.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/networking/libiproute/libnetlink.c
> b/networking/libiproute/libnetlink.c
> index 3f0f703..44e28ff 100644
> --- a/networking/libiproute/libnetlink.c
> +++ b/networking/libiproute/libnetlink.c
> @@ -401,6 +401,11 @@ int FAST_FUNC rta_addattr_l(struct rtattr *rta, int
> maxlen, int type, void *data
>
>  void FAST_FUNC parse_rtattr(struct rtattr *tb[], int max, struct rtattr
> *rta, int len)
>  {
> +        int index = 0;
> +        for (index =0; index <= max; ++index) {
> +               tb[index] = NULL;
> +        }
> +
>         while (RTA_OK(rta, len)) {
>                 if (rta->rta_type <= max) {
>                         tb[rta->rta_type] = rta;
> --
> 2.1.4
>
>
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
>


More information about the busybox mailing list