Re: [PATCH net,v4] net/smc: prevent NULL pointer dereference in txopt_get

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 14.08.24 15:11, D. Wythe wrote:
>     struct smc_sock {                /* smc sock container */
> -    struct sock        sk;
> +    union {
> +        struct sock        sk;
> +        struct inet_sock    inet;
> +    };


I don't see a path where this breaks, but it looks risky to me.
Is an smc_sock always an inet_sock as well? Then can't you go with smc_sock->inet_sock->sk ?
Or only in the IPPROTO SMC case, and in the AF_SMC case it is not an inet_sock?




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux