[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <8d270882-54da-365e-1be7-a291a5178b1e@gmail.com>
Date: Wed, 24 Jul 2019 16:50:03 +0800
From: Jia-Ju Bai <baijiaju1990@...il.com>
To: rpeterso@...hat.com, agruenba@...hat.com
Cc: cluster-devel@...hat.com, linux-kernel@...r.kernel.org
Subject: [BUG] fs: gfs2: possible null-pointer dereferences in
gfs2_rgrp_bh_get()
In gfs2_rgrp_bh_get, there is an if statement on line 1191 to check
whether "rgd->rd_bits[0].bi_bh" is NULL.
When "rgd->rd_bits[0].bi_bh" is NULL, it is used on line 1216:
gfs2_rgrp_in(rgd, (rgd->rd_bits[0].bi_bh)->b_data);
and on line 1225:
gfs2_rgrp_ondisk2lvb(..., rgd->rd_bits[0].bi_bh->b_data);
and on line 1228:
if (!gfs2_rgrp_lvb_valid(rgd))
Note that in gfs2_rgrp_lvb_valid(rgd), there is a statement on line 1114:
struct gfs2_rgrp *str = (struct gfs2_rgrp
*)rgd->rd_bits[0].bi_bh->b_data;
Thus, possible null-pointer dereferences may occur.
These bugs are found by a static analysis tool STCheck written by us.
I do not know how to correctly fix these bugs, so I only report bugs.
Best wishes,
Jia-Ju Bai
Powered by blists - more mailing lists