Re: [PATCH v1] net/ipv6/addrconf.c: Check the return value of __in6_dev_get() in addrconf_type_change()

From: Cong Wang
Date: Sun Aug 21 2022 - 14:19:25 EST


On Sat, Aug 20, 2022 at 03:24:34AM -0700, lily wrote:
> The function __in6_dev_get() could return NULL pointer. This needs to be
> checked before used in ipv6_mc_remap() and ipv6_mc_unmap(). Otherwise it
> could result in null pointer dereference.

Its caller already checks it:

3689 if (idev)
3690 addrconf_type_change(dev, event);
3691 break;