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>] [day] [month] [year] [list]
Message-ID: <ZT63LEJCuIY7v_Ou@hoboy.vegasvil.org>
Date:   Sun, 29 Oct 2023 12:49:00 -0700
From:   Richard Cochran <richardcochran@...il.com>
To:     Edward Adam Davis <eadavis@...com>
Cc:     davem@...emloft.net, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org, reibax@...il.com,
        syzbot+df3f3ef31f60781fa911@...kaller.appspotmail.com,
        syzkaller-bugs@...glegroups.com
Subject: Re: [PATCH-net-next] ptp: fix corrupted list in ptp_open

On Sun, Oct 29, 2023 at 10:09:42AM +0800, Edward Adam Davis wrote:
> There is no lock protection when writing ptp->tsevqs in ptp_open(), ptp_read(),
> ptp_release(), which can cause data corruption and increase mutual exclusion
> to avoid this issue.

-ENOPARSE

How can lack of lock protection increase mutual exclusion?

> Moreover, the queue should not be released in ptp_read() and should be deleted
> together.

The queue should be deleted togther?  Huh?

> @@ -543,6 +552,8 @@ ssize_t ptp_read(struct posix_clock_context *pccontext, uint rdflags,
>  		cnt = EXTTS_BUFSIZE;
>  
>  	cnt = cnt / sizeof(struct ptp_extts_event);
> +	if (mutex_lock_interruptible(&ptp->tsevq_mux)) 
> +		return -ERESTARTSYS;

This is not needed because the spin lock (timestamp_event_queue::lock)
already protects the event queue.

Thanks,
Richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ