From: sashiko-bot@kernel.org
To: "Liu Dalin" <liudalin@kylinsec.com.cn>
Cc: linux-rtc@vger.kernel.org,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>
Subject: Re: [PATCH] rtc: dev: zero-initialize struct rtc_wkalrm to prevent information leak
Date: Thu, 27 Aug 2026 02:04:05 +0000 [thread overview]
Message-ID: <20260827020405.D64D91F000E9@smtp.kernel.org> (raw)
In-Reply-To: <B28B7DE18F3A9447+20260827015444.3314227-1-liudalin@kylinsec.com.cn>
> The struct rtc_wkalrm has padding holes after the 'pending' member.
> When returned to userspace via the RTC_WKALRM_RD ioctl, uninitialized
> kernel stack data residing in these holes may be leaked.
>
> Zero-initialize the struct at declaration to eliminate this information
> leak risk.
>
> Fixes smatch warnings:
> - drivers/rtc/dev.c:392 rtc_dev_ioctl() warn: check that 'alarm' doesn't
> leak information (struct has a hole after 'pending')
>
> Fixes: 36e14f5fdfdf ("rtc: rename core files")
> Assisted-by: smatch:2.0 [static analysis]
> Signed-off-by: Liu Dalin <liudalin@kylinsec.com.cn>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/B28B7DE18F3A9447+20260827015444.3314227-1-liudalin@kylinsec.com.cn?part=1
next prev parent reply other threads:[~2026-08-27 2:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 1:54 [PATCH] rtc: dev: zero-initialize struct rtc_wkalrm to prevent information leak Liu Dalin
2026-08-27 2:04 ` sashiko-bot [this message]
2026-09-21 19:14 ` Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260827020405.D64D91F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-rtc@vger.kernel.org \
--cc=liudalin@kylinsec.com.cn \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.