lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1902810966.5288.1763619757671.JavaMail.zimbra@couthit.local>
Date: Thu, 20 Nov 2025 11:52:37 +0530 (IST)
From: Parvathi Pudi <parvathi@...thit.com>
To: Simon Horman <horms@...nel.org>
Cc: Parvathi Pudi <parvathi@...thit.com>, andrew+netdev <andrew+netdev@...n.ch>, 
	davem <davem@...emloft.net>, edumazet <edumazet@...gle.com>, 
	kuba <kuba@...nel.org>, pabeni <pabeni@...hat.com>, 
	danishanwar <danishanwar@...com>, rogerq <rogerq@...nel.org>, 
	pmohan <pmohan@...thit.com>, basharath <basharath@...thit.com>, 
	afd <afd@...com>, linux-kernel <linux-kernel@...r.kernel.org>, 
	netdev <netdev@...r.kernel.org>, 
	linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>, 
	ALOK TIWARI <alok.a.tiwari@...cle.com>, pratheesh <pratheesh@...com>, 
	j-rameshbabu <j-rameshbabu@...com>, 
	Vignesh Raghavendra <vigneshr@...com>, praneeth <praneeth@...com>, 
	srk <srk@...com>, rogerq <rogerq@...com>, 
	krishna <krishna@...thit.com>, mohan <mohan@...thit.com>
Subject: Re: [PATCH net-next v5 2/3] net: ti: icssm-prueth: Adds switchdev
 support for icssm_prueth driver

Hi,

> On Thu, Nov 13, 2025 at 03:40:22PM +0530, Parvathi Pudi wrote:
> 
> ...
> 
>> @@ -222,12 +229,14 @@ struct prueth_emac {
>>  	const char *phy_id;
>>  	u32 msg_enable;
>>  	u8 mac_addr[6];
>> +	unsigned char mc_filter_mask[ETH_ALEN]; /* for multicast filtering */
>>  	phy_interface_t phy_if;
>>  
>>  	/* spin lock used to protect
>>  	 * during link configuration
>>  	 */
>>  	spinlock_t lock;
>> +	spinlock_t addr_lock;   /* serialize access to VLAN/MC filter table */
> 
> addr_lock does not appear to be initialised anywhere.
> 
> ...
> 

Sure, we will address this in next version.


>> +static int icssm_prueth_switchdev_obj_del(struct net_device *ndev,
>> +					  const void *ctx,
>> +					  const struct switchdev_obj *obj)
>> +{
>> +	struct switchdev_obj_port_mdb *mdb = SWITCHDEV_OBJ_PORT_MDB(obj);
>> +	struct prueth_emac *emac = netdev_priv(ndev);
>> +	struct prueth *prueth = emac->prueth;
>> +	struct netdev_hw_addr *ha;
>> +	u8 hash, tmp_hash;
>> +	int ret = 0;
>> +
>> +	switch (obj->id) {
>> +	case SWITCHDEV_OBJ_ID_HOST_MDB:
>> +		dev_dbg(prueth->dev, "MDB del: %s: vid %u:%pM  port: %x\n",
>> +			ndev->name, mdb->vid, mdb->addr, emac->port_id);
>> +		hash = icssm_emac_get_mc_hash(mdb->addr, emac->mc_filter_mask);
>> +		netdev_for_each_mc_addr(ha, prueth->hw_bridge_dev) {
> 
> Is there anything stopping this event from occurring when
> the port is not the lower device of a bridge - before being added
> or after being removed?
> 
> If not, then passing prueth->hw_bridge_dev to netdev_for_each_mc_addr()
> will result in a null pointer dereference.
> 
> ...

Sure, we’ll verify the code and add the appropriate conditional
checks to ensure "prueth->hw_bridge_dev" is valid before using it.
This will be addressed in the next version.

Thanks and Regards,
Parvathi.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ