On Mon, Aug 04, 2025 at 05:19:59PM +0200, Vlastimil Babka wrote:
On 8/4/25 04:57, Li Qiong wrote:
object_err() reports details of an object for further debugging, such as the freelist pointer, redzone, etc. However, if the pointer is invalid, attempting to access object metadata can lead to a crash since it does not point to a valid object.
In case the pointer is NULL or check_valid_pointer() returns false for the pointer, only print the pointer value and skip accessing metadata.
We should explain that this is not theoretical so justify the stable cc, so I would add:
One known path to the crash is when alloc_consistency_checks() determines the pointer to the allocated object is invalid beause of a freelist
nit: beause -> because
corruption, and calls object_err() to report it. The debug code should report and handle the corruption gracefully and not crash in the process.
If you agree, I can do this when picking up the patch after merge window, no need to resend.
Fixes: 81819f0fc828 ("SLUB core") Cc: stable@vger.kernel.org Signed-off-by: Li Qiong liqiong@nfschina.com
Reviewed-by: Harry Yoo harry.yoo@oracle.com