CVE-2024-36001 – netfs: Fix the pre-flush when appending to a file in writethrough mode
https://notcve.org/view.php?id=CVE-2024-36001
In the Linux kernel, the following vulnerability has been resolved: netfs: Fix the pre-flush when appending to a file in writethrough mode In netfs_perform_write(), when the file is marked NETFS_ICTX_WRITETHROUGH or O_*SYNC or RWF_*SYNC was specified, write-through caching is performed on a buffered file. When setting up for write-through, we flush any conflicting writes in the region and wait for the write to complete, failing if there's a write error to return. The issue arises if we're writing at or above the EOF position because we skip the flush and - more importantly - the wait. This becomes a problem if there's a partial folio at the end of the file that is being written out and we want to make a write to it too. Both the already-running write and the write we start both want to clear the writeback mark, but whoever is second causes a warning looking something like: ------------[ cut here ]------------ R=00000012: folio 11 is not under writeback WARNING: CPU: 34 PID: 654 at fs/netfs/write_collect.c:105 ... CPU: 34 PID: 654 Comm: kworker/u386:27 Tainted: G S ... ... Workqueue: events_unbound netfs_write_collection_worker ... RIP: 0010:netfs_writeback_lookup_folio Fix this by making the flush-and-wait unconditional. It will do nothing if there are no folios in the pagecache and will return quickly if there are no folios in the region specified. Further, move the WBC attachment above the flush call as the flush is going to attach a WBC and detach it again if it is not present - and since we need one anyway we might as well share it. • https://git.kernel.org/stable/c/41d8e7673a7726cba57cb8112d81c89cfb6c3e35 https://git.kernel.org/stable/c/5eaf23b2e81349f6614f88396dc468fda89fc0b9 https://git.kernel.org/stable/c/c97f59e276d4e93480f29a70accbd0d7273cf3f5 •
CVE-2024-36000 – mm/hugetlb: fix missing hugetlb_lock for resv uncharge
https://notcve.org/view.php?id=CVE-2024-36000
In the Linux kernel, the following vulnerability has been resolved: mm/hugetlb: fix missing hugetlb_lock for resv uncharge There is a recent report on UFFDIO_COPY over hugetlb: https://lore.kernel.org/all/000000000000ee06de0616177560@google.com/ 350: lockdep_assert_held(&hugetlb_lock); Should be an issue in hugetlb but triggered in an userfault context, where it goes into the unlikely path where two threads modifying the resv map together. Mike has a fix in that path for resv uncharge but it looks like the locking criteria was overlooked: hugetlb_cgroup_uncharge_folio_rsvd() will update the cgroup pointer, so it requires to be called with the lock held. En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: mm/hugetlb: corrige la falta de Hugetlb_lock para descarga de resv. Hay un informe reciente sobre UFFDIO_COPY sobre Hugetlb: https://lore.kernel.org/all/000000000000ee06de0616177560@google.com/ 350: lockdep_assert_held(&hugetlb_lock); Debería ser un problema en hugetlb pero se activa en un contexto de error de usuario, donde entra en la ruta poco probable en la que dos subprocesos modifican el mapa resv juntos. Mike tiene una solución en esa ruta para la descarga de resv, pero parece que se pasó por alto el criterio de bloqueo: hugetlb_cgroup_uncharge_folio_rsvd() actualizará el puntero de cgroup, por lo que es necesario llamarlo con el bloqueo retenido. • https://git.kernel.org/stable/c/79aa925bf239c234be8586780e482872dc4690dd https://git.kernel.org/stable/c/f87004c0b2bdf0f1066b88795d8e6c1dfad6cea0 https://git.kernel.org/stable/c/4c806333efea1000a2a9620926f560ad2e1ca7cc https://git.kernel.org/stable/c/f6c5d21db16a0910152ec8aa9d5a7aed72694505 https://git.kernel.org/stable/c/538faabf31e9c53d8c870d114846fda958a0de10 https://git.kernel.org/stable/c/b76b46902c2d0395488c8412e1116c2486cdfcb2 https://access.redhat.com/security/cve/CVE-2024-36000 https://bugzilla.redhat.com/show_bug.cgi?id=2281968 •
CVE-2024-35999 – smb3: missing lock when picking channel
https://notcve.org/view.php?id=CVE-2024-35999
In the Linux kernel, the following vulnerability has been resolved: smb3: missing lock when picking channel Coverity spotted a place where we should have been holding the channel lock when accessing the ses channel index. Addresses-Coverity: 1582039 ("Data race condition (MISSING_LOCK)") En el kernel de Linux, se resolvió la siguiente vulnerabilidad: smb3: falta el bloqueo al seleccionar el canal. Coverity detectó un lugar donde deberíamos haber mantenido el bloqueo del canal al acceder al índice del canal ses. Direcciones-Cobertura: 1582039 ("Condición de ejecución de datos (MISSING_LOCK)") • https://git.kernel.org/stable/c/98c7ed29cd754ae7475dc7cb3f33399fda902729 https://git.kernel.org/stable/c/0fcf7e219448e937681216353c9a58abae6d3c2e https://git.kernel.org/stable/c/60ab245292280905603bc0d3654f4cf8fceccb00 https://git.kernel.org/stable/c/8094a600245e9b28eb36a13036f202ad67c1f887 •
CVE-2024-35998 – smb3: fix lock ordering potential deadlock in cifs_sync_mid_result
https://notcve.org/view.php?id=CVE-2024-35998
In the Linux kernel, the following vulnerability has been resolved: smb3: fix lock ordering potential deadlock in cifs_sync_mid_result Coverity spotted that the cifs_sync_mid_result function could deadlock "Thread deadlock (ORDER_REVERSAL) lock_order: Calling spin_lock acquires lock TCP_Server_Info.srv_lock while holding lock TCP_Server_Info.mid_lock" Addresses-Coverity: 1590401 ("Thread deadlock (ORDER_REVERSAL)") En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: smb3: corrige el posible interbloqueo en el orden de bloqueo en cifs_sync_mid_result Coverity detectó que la función cifs_sync_mid_result podría interbloquearse "Interbloqueo de subprocesos (ORDER_REVERSAL) lock_order: llamar a spin_lock adquiere el bloqueo TCP_Server_Info.srv_lock mientras mantiene el bloqueo TCP_Server_Info.mid_lock "Direcciones-Cobertura: 1590401 ("Estancamiento del hilo (ORDER_REVERSAL)") • https://git.kernel.org/stable/c/c7a4bca289e50bb4b2650f845c41bb3e453f4c66 https://git.kernel.org/stable/c/699f8958dece132709c0bff6a9700999a2a63b75 https://git.kernel.org/stable/c/8248224ab5b8ca7559b671917c224296a4d671fc https://git.kernel.org/stable/c/8861fd5180476f45f9e8853db154600469a0284f •
CVE-2024-35997 – HID: i2c-hid: remove I2C_HID_READ_PENDING flag to prevent lock-up
https://notcve.org/view.php?id=CVE-2024-35997
In the Linux kernel, the following vulnerability has been resolved: HID: i2c-hid: remove I2C_HID_READ_PENDING flag to prevent lock-up The flag I2C_HID_READ_PENDING is used to serialize I2C operations. However, this is not necessary, because I2C core already has its own locking for that. More importantly, this flag can cause a lock-up: if the flag is set in i2c_hid_xfer() and an interrupt happens, the interrupt handler (i2c_hid_irq) will check this flag and return immediately without doing anything, then the interrupt handler will be invoked again in an infinite loop. Since interrupt handler is an RT task, it takes over the CPU and the flag-clearing task never gets scheduled, thus we have a lock-up. Delete this unnecessary flag. En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: HID: i2c-hid: elimine el indicador I2C_HID_READ_PENDING para evitar el bloqueo. El indicador I2C_HID_READ_PENDING se utiliza para serializar operaciones I2C. Sin embargo, esto no es necesario, porque el núcleo I2C ya tiene su propio bloqueo para ello. Más importante aún, este indicador puede causar un bloqueo: si el indicador está configurado en i2c_hid_xfer() y ocurre una interrupción, el controlador de interrupciones (i2c_hid_irq) verificará este indicador y regresará inmediatamente sin hacer nada, entonces se invocará el controlador de interrupciones. nuevamente en un bucle infinito. • https://git.kernel.org/stable/c/4a200c3b9a40242652b5734630bdd0bcf3aca75f https://git.kernel.org/stable/c/21bfca822cfc1e71796124e93b46e0d9fa584401 https://git.kernel.org/stable/c/c448a9fd50f77e8fb9156ff64848aa4295eb3003 https://git.kernel.org/stable/c/5095b93021b899f54c9355bebf36d78854c33a22 https://git.kernel.org/stable/c/b65fb50e04a95eec34a9d1bc138454a98a5578d8 https://git.kernel.org/stable/c/0561b65fbd53d3e788c5b0222d9112ca016fd6a1 https://git.kernel.org/stable/c/29e94f295bad5be59cf4271a93e22cdcf5536722 https://git.kernel.org/stable/c/418c5575d56410c6e186ab727bf32ae32 • CWE-400: Uncontrolled Resource Consumption CWE-667: Improper Locking •