public inbox for libc-stable@sourceware.org
 help / color / mirror / Atom feed
* [2.33 and 2.34][PATCH] Simplify __opensock and fix race condition [BZ #28353]
@ 2022-02-03 11:43 pgowda cve
  2022-02-03 11:47 ` Florian Weimer
  0 siblings, 1 reply; 2+ messages in thread
From: pgowda cve @ 2022-02-03 11:43 UTC (permalink / raw)
  To: libc-stable; +Cc: fweimer, samuel.thibault

[-- Attachment #1: Type: text/plain, Size: 201 bytes --]

Hi,

(cherry picked from commit 5bf07e1b3a74232bfb8332275110be1a5da50f83)

Please find attached the backported patch for glibc versions 2.33 and 2.34.
Please let me know if it's okay.

Regards,
Pgowda

[-- Attachment #2: Race_condition_on_opensock.patch --]
[-- Type: application/x-patch, Size: 7141 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [2.33 and 2.34][PATCH] Simplify __opensock and fix race condition [BZ #28353]
  2022-02-03 11:43 [2.33 and 2.34][PATCH] Simplify __opensock and fix race condition [BZ #28353] pgowda cve
@ 2022-02-03 11:47 ` Florian Weimer
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Weimer @ 2022-02-03 11:47 UTC (permalink / raw)
  To: pgowda cve; +Cc: libc-stable, samuel.thibault

* pgowda cve:

> (cherry picked from commit 5bf07e1b3a74232bfb8332275110be1a5da50f83)
>
> Please find attached the backported patch for glibc versions 2.33 and 2.34.
> Please let me know if it's okay.

I think we would have to backport all these commits:

commit 3d981795cd00cc9b73c3ee5087c308361acd62e5
Author: Florian Weimer <fweimer@redhat.com>
Date:   Mon Nov 22 14:41:14 2021 +0100

    socket: Do not use AF_NETLINK in __opensock
    
    It is not possible to use interface ioctls with netlink sockets
    on all Linux kernels.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

commit 1d3decee997ba2fc24af81803299b2f4f3c47063
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Mon Oct 18 01:39:02 2021 +0200

    hurd if_index: Explicitly use AF_INET for if index discovery
    
    5bf07e1b3a74 ("Linux: Simplify __opensock and fix race condition [BZ #28353]")
    made __opensock try NETLINK then UNIX then INET. On the Hurd, only INET
    knows about network interfaces, so better actually specify that in
    if_index.

commit 5bf07e1b3a74232bfb8332275110be1a5da50f83
Author: Florian Weimer <fweimer@redhat.com>
Date:   Tue Sep 28 18:55:49 2021 +0200

    Linux: Simplify __opensock and fix race condition [BZ #28353]
    
    AF_NETLINK support is not quite optional on modern Linux systems
    anymore, so it is likely that the first attempt will always succeed.
    Consequently, there is no need to cache the result.  Keep AF_UNIX
    and the Internet address families as a fallback, for the rare case
    that AF_NETLINK is missing.  The other address families previously
    probed are totally obsolete be now, so remove them.
    
    Use this simplified version as the generic implementation, disabling
    Netlink support as needed.

I can do that, no need to send patches.

Thanks,
Florian


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-03 11:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-03 11:43 [2.33 and 2.34][PATCH] Simplify __opensock and fix race condition [BZ #28353] pgowda cve
2022-02-03 11:47 ` Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).