Search Linux Wireless

Re: [PATCH v3] ssb: Fix potential NULL pointer dereference in ssb_device_uevent

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

 



On Thu,  7 Mar 2024 16:41:42 +0300
Rand Deeb <rand.sec96@xxxxxxxxx> wrote:

> Given that null is improbable in this context due to the calls being made 
> through uevent, we should eliminate the redundant condition. In light of 
> this, would you recommend sending a new version (v4)

No.

We should _not_ eliminate NULL checks in this code.
Ever.
There is only one reason to eliminate NULL checks:
In extremely performance critical code, if it improves performance
significantly and it is clearly documented that the pointer can never be NULL.

This is not that case here. This is not critical code.

Having NULL checks is defensive programming.
Removing NULL checks is a hazard.
Not having these checks is a big part of why security sucks in today's software.

V3 shall be applied, because it fixes a clear bug. Whether this bug can actually
be triggered or not in today's kernel doesn't matter.

-- 
Michael Büsch
https://bues.ch/

Attachment: pgpDkU01I7cLs.pgp
Description: OpenPGP digital signature


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux