mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sergey Shtylyov <s.shtylyov@omp.ru>
To: Roman Smirnov <r.smirnov@omp.ru>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Breno Leitao <leitao@debian.org>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Karina Yankevich <k.yankevich@omp.ru>,
	<lvc-project@linuxtesting.org>
Subject: Re: [PATCH] drivers: net: bsd_comp: fix integer overflow in bsd_decompress()
Date: Mon, 12 Aug 2024 12:54:40 +0300	[thread overview]
Message-ID: <bd95f568-a4cd-6ffa-9260-fa261f40f252@omp.ru> (raw)
In-Reply-To: <61528e45-b2a7-5ef9-09dd-9cdc63c4599e@omp.ru>

On 8/12/24 12:41 PM, Sergey Shtylyov wrote:

[...]

> On 8/12/24 11:43 AM, Roman Smirnov wrote:
> 
>> The result of a bit shift has type int.
> 
>    So far, so good... :-)
> 
>> If ibuf is greater than or
> 
>    *ibuf maybe? :-)
> 
>> equal to 128, a sign switch will occur.
> 
>    I wonder whether you had looked at the .lsy file before writing
> that...
>    Actually, movzvl (%rdi),%eax is used when reading *buf, so no 

   It was movzbl, of course...

> sign extension occurs at this point... it occurs when casting the 
> result of shift to *unsignjed long*

   ... before ORing with accm.

[...]

MBR, Sergey

      reply	other threads:[~2024-08-12  9:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-12  8:43 Roman Smirnov
2024-08-12  9:41 ` Sergey Shtylyov
2024-08-12  9:54   ` Sergey Shtylyov [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=bd95f568-a4cd-6ffa-9260-fa261f40f252@omp.ru \
    --to=s.shtylyov@omp.ru \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=k.yankevich@omp.ru \
    --cc=kuba@kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=r.smirnov@omp.ru \
    /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

all inboxes | Powered by JetHome®