From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: fbcon: Avoid OOB font access if console rotation fails Date: Sun, 12 Apr 2026 13:55:01 +1000 Message-ID: In-Reply-To: <20260407092555.58816-2-tzimmermann@suse.de> References: <20260407092555.58816-1-tzimmermann@suse.de> <20260407092555.58816-2-tzimmermann@suse.de> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review **Verdict: Good fix, correct for stable backport.** The original code in `fbcon_rotate_font()` keeps the old (too-small) `fontbuffer` when reallocation for a larger rotated font fails. Subsequent character output can then overflow the buffer. The fix clears the buffer state *before* attempting allocation: ```c + kfree(par->fontbuffer); + par->fontbuffer = NULL; + par->fd_size = 0; + dst = kmalloc_array(len, d_cellsize, GFP_KERNEL); ``` This is correct. When `fontbuffer` is NULL, the rotated `putcs` implementations (`ccw_putcs`, `cw_putcs`, `ud_putcs`) check `if (!par->fontbuffer) return;` and bail out safely. The Fixes tag and Cc:stable are appropriate for a bug dating to v2.6.15. No issues. --- --- Generated by Claude Code Patch Reviewer