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] [day] [month] [year] [list]
Date:   Fri, 31 Mar 2023 01:13:46 +0530
From:   Sricharan Ramabadhran <quic_srichara@...cinc.com>
To:     Manivannan Sadhasivam <mani@...nel.org>
CC:     <manivannan.sadhasivam@...aro.org>, <davem@...emloft.net>,
        <edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>,
        <linux-arm-msm@...r.kernel.org>, <netdev@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: qrtr: Do not do DEL_SERVER broadcast after
 DEL_CLIENT



On 3/30/2023 6:09 PM, Manivannan Sadhasivam wrote:
> On Wed, Mar 29, 2023 at 06:37:30PM +0530, Sricharan R wrote:
>> When the qrtr socket is released, qrtr_port_remove gets called, which
>> broadcasts a DEL_CLIENT. After this DEL_SERVER is also additionally
>> broadcasted, which becomes NOP, but triggers the below error msg.
>>
>> "failed while handling packet from 2:-2", since remote node already
>> acted upon on receiving the DEL_CLIENT, once again when it receives
>> the DEL_SERVER, it returns -ENOENT.
>>
>> Fixing it by not sending a 'DEL_SERVER' to remote when a 'DEL_CLIENT'
>> was sent for that port.
>>
> 
> How about:
> 
> "On the remote side, when QRTR socket is removed, af_qrtr will call
> qrtr_port_remove() which broadcasts the DEL_CLIENT packet to all neighbours
> including local NS. NS upon receiving the DEL_CLIENT packet, will remove
> the lookups associated with the node:port and broadcasts the DEL_SERVER
> packet.
> 
> But on the host side, due to the arrival of the DEL_CLIENT packet, the NS
> would've already deleted the server belonging to that port. So when the
> remote's NS again broadcasts the DEL_SERVER for that port, it throws below
> error message on the host:
> 
> "failed while handling packet from 2:-2"
> 
> So fix this error by not broadcasting the DEL_SERVER packet when the
> DEL_CLIENT packet gets processed."
> 

   Sure, sounds good. Will change this up and send V2.

>> Signed-off-by: Ram Kumar D <quic_ramd@...cinc.com>
>> Signed-off-by: Sricharan R <quic_srichara@...cinc.com>
>> ---
>> Note: Functionally tested on 5.4 kernel and compile tested on 6.3 TOT
>>

  <...>

>>   
>> -	/* Remove the server belonging to this port */
>> +	/* Remove the server belonging to this port
>> +	 * Given that DEL_CLIENT is already broadcasted
>> +	 * by port_remove, no need to send DEL_SERVER for
>> +	 * the same port to remote
>> +	 */
> 
> 	/*
>   	 * Remove the server belonging to this port but don't broadcast
> 	 * DEL_SERVER. Neighbours would've already removed the server belonging
> 	 * to this port due to the DEL_CLIENT broadcast from qrtr_port_remove().
> 	 */

    Sure, would reword it like above in V2. Thanks.

Regards,
  Sricharan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ