Linux s390 Architecture development
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@linux.ibm.com>
To: Gerald Schaefer <gerald.schaefer@linux.ibm.com>,
	linux-s390 <linux-s390@vger.kernel.org>
Cc: Heiko Carstens <hca@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>
Subject: Re: [PATCH v2] s390/monwriter: Reject buffer reuse with different data length
Date: Wed, 24 Jun 2026 17:10:42 +0200	[thread overview]
Message-ID: <72dabfe1-6302-4868-8351-c853a613ada6@linux.ibm.com> (raw)
In-Reply-To: <20260623174406.189869-1-gerald.schaefer@linux.ibm.com>

Am 23.06.26 um 19:44 schrieb Gerald Schaefer:
> When data buffers are reused, e.g. for interval sample records, the
> first record determines the data length, and the size of the buffer for
> user copy. Current monwriter code does not check if the data length was
> changed for subsequent records, which also would never happen for valid
> user programs.
> 
> However, a malicious user could change the data length, resulting in out
> of bounds user copy to the kernel buffer, and memory corruption. By
> default, the monwriter misc device is created with root-only permissions,
> so practical impact is typically low.
> 
> Fix this by checking for changed data length and rejecting such records.
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com>

Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>



      parent reply	other threads:[~2026-06-24 15:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-23 17:44 [PATCH v2] s390/monwriter: Reject buffer reuse with different data length Gerald Schaefer
2026-06-23 17:55 ` sashiko-bot
2026-06-24 15:10 ` Christian Borntraeger [this message]

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=72dabfe1-6302-4868-8351-c853a613ada6@linux.ibm.com \
    --to=borntraeger@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=gerald.schaefer@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox