mbox series

[SRU,J,0/1] CVE-2024-42079

Message ID 20241008201811.72174-1-massimiliano.pellizzer@canonical.com
Headers show
Series CVE-2024-42079 | expand

Message

Massimiliano Pellizzer Oct. 8, 2024, 8:18 p.m. UTC
[Impact]

gfs2: Fix NULL pointer dereference in gfs2_log_flush

In gfs2_jindex_free(), set sdp->sd_jdesc to NULL under the log flush
lock to provide exclusion against gfs2_log_flush().

In gfs2_log_flush(), check if sdp->sd_jdesc is non-NULL before
dereferencing it.  Otherwise, we could run into a NULL pointer
dereference when outstanding glock work races with an unmount
(glock_work_func -> run_queue -> do_xmote -> inode_go_sync ->
gfs2_log_flush).

[Fix]

Noble:  Fixed
Jammy:  Backported from linux-6.6.y
Focal:  Not affected
Bionic: Not affected
Xenial: Not affected

[Test Case]

Compile and boot tested.

[Where problems could occur]

The fix affects the GFS2 filesystem. Ans issue with this fix may lead to
kernel crashes. Users may also notice file system inconsistencies
potentially leading to incomplete or corrupted data writes. These issues
may present themselves particularly when multiple nodes are concurrently
accessing the same resource in the filesystem.

Andreas Gruenbacher (1):
  gfs2: Fix NULL pointer dereference in gfs2_log_flush

 fs/gfs2/log.c   | 3 ++-
 fs/gfs2/super.c | 4 ++++
 2 files changed, 6 insertions(+), 1 deletion(-)

Comments

ivanhu Oct. 9, 2024, 4:05 a.m. UTC | #1
Acked-by: Ivan Hu <ivan.hu@canonical.com>

On 10/9/24 04:18, Massimiliano Pellizzer wrote:
> [Impact]
> 
> gfs2: Fix NULL pointer dereference in gfs2_log_flush
> 
> In gfs2_jindex_free(), set sdp->sd_jdesc to NULL under the log flush
> lock to provide exclusion against gfs2_log_flush().
> 
> In gfs2_log_flush(), check if sdp->sd_jdesc is non-NULL before
> dereferencing it.  Otherwise, we could run into a NULL pointer
> dereference when outstanding glock work races with an unmount
> (glock_work_func -> run_queue -> do_xmote -> inode_go_sync ->
> gfs2_log_flush).
> 
> [Fix]
> 
> Noble:  Fixed
> Jammy:  Backported from linux-6.6.y
> Focal:  Not affected
> Bionic: Not affected
> Xenial: Not affected
> 
> [Test Case]
> 
> Compile and boot tested.
> 
> [Where problems could occur]
> 
> The fix affects the GFS2 filesystem. Ans issue with this fix may lead to
> kernel crashes. Users may also notice file system inconsistencies
> potentially leading to incomplete or corrupted data writes. These issues
> may present themselves particularly when multiple nodes are concurrently
> accessing the same resource in the filesystem.
> 
> Andreas Gruenbacher (1):
>    gfs2: Fix NULL pointer dereference in gfs2_log_flush
> 
>   fs/gfs2/log.c   | 3 ++-
>   fs/gfs2/super.c | 4 ++++
>   2 files changed, 6 insertions(+), 1 deletion(-)
>
Guoqing Jiang Oct. 9, 2024, 6:10 a.m. UTC | #2
Acked-by: Guoqing Jiang <guoqing.jiang@canonical.com>

On 10/9/24 04:18, Massimiliano Pellizzer wrote:
> [Impact]
>
> gfs2: Fix NULL pointer dereference in gfs2_log_flush
>
> In gfs2_jindex_free(), set sdp->sd_jdesc to NULL under the log flush
> lock to provide exclusion against gfs2_log_flush().
>
> In gfs2_log_flush(), check if sdp->sd_jdesc is non-NULL before
> dereferencing it.  Otherwise, we could run into a NULL pointer
> dereference when outstanding glock work races with an unmount
> (glock_work_func -> run_queue -> do_xmote -> inode_go_sync ->
> gfs2_log_flush).
>
> [Fix]
>
> Noble:  Fixed
> Jammy:  Backported from linux-6.6.y
> Focal:  Not affected
> Bionic: Not affected
> Xenial: Not affected
>
> [Test Case]
>
> Compile and boot tested.
>
> [Where problems could occur]
>
> The fix affects the GFS2 filesystem. Ans issue with this fix may lead to
> kernel crashes. Users may also notice file system inconsistencies
> potentially leading to incomplete or corrupted data writes. These issues
> may present themselves particularly when multiple nodes are concurrently
> accessing the same resource in the filesystem.
>
> Andreas Gruenbacher (1):
>    gfs2: Fix NULL pointer dereference in gfs2_log_flush
>
>   fs/gfs2/log.c   | 3 ++-
>   fs/gfs2/super.c | 4 ++++
>   2 files changed, 6 insertions(+), 1 deletion(-)
>
Stefan Bader Oct. 11, 2024, 9:58 a.m. UTC | #3
On 08.10.24 22:18, Massimiliano Pellizzer wrote:
> [Impact]
> 
> gfs2: Fix NULL pointer dereference in gfs2_log_flush
> 
> In gfs2_jindex_free(), set sdp->sd_jdesc to NULL under the log flush
> lock to provide exclusion against gfs2_log_flush().
> 
> In gfs2_log_flush(), check if sdp->sd_jdesc is non-NULL before
> dereferencing it.  Otherwise, we could run into a NULL pointer
> dereference when outstanding glock work races with an unmount
> (glock_work_func -> run_queue -> do_xmote -> inode_go_sync ->
> gfs2_log_flush).
> 
> [Fix]
> 
> Noble:  Fixed
> Jammy:  Backported from linux-6.6.y
> Focal:  Not affected
> Bionic: Not affected
> Xenial: Not affected
> 
> [Test Case]
> 
> Compile and boot tested.
> 
> [Where problems could occur]
> 
> The fix affects the GFS2 filesystem. Ans issue with this fix may lead to
> kernel crashes. Users may also notice file system inconsistencies
> potentially leading to incomplete or corrupted data writes. These issues
> may present themselves particularly when multiple nodes are concurrently
> accessing the same resource in the filesystem.
> 
> Andreas Gruenbacher (1):
>    gfs2: Fix NULL pointer dereference in gfs2_log_flush
> 
>   fs/gfs2/log.c   | 3 ++-
>   fs/gfs2/super.c | 4 ++++
>   2 files changed, 6 insertions(+), 1 deletion(-)
> 

Applied to jammy:linux/master-next. Thanks.

-Stefan