All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block/nfs: fix int overflow in nfs_client_open_qdict
@ 2020-12-09 12:17 Peter Lieven
  2020-12-10  9:00 ` Stefano Garzarella
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Lieven @ 2020-12-09 12:17 UTC (permalink / raw)
  To: qemu-block; +Cc: kwolf, qemu-stable, Peter Lieven, qemu-devel, mreitz

nfs_client_open returns the file size in sectors. This effectively
makes it impossible to open files larger than 1TB.

Fixes: a1a42af422d46812f1f0cebe6b230c20409a3731
Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Lieven <pl@kamp.de>
---
 block/nfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/nfs.c b/block/nfs.c
index 77905f516d..8c1968bb41 100644
--- a/block/nfs.c
+++ b/block/nfs.c
@@ -592,7 +592,7 @@ static int64_t nfs_client_open_qdict(NFSClient *client, QDict *options,
                                      int flags, int open_flags, Error **errp)
 {
     BlockdevOptionsNfs *opts;
-    int ret;
+    int64_t ret;
 
     opts = nfs_options_qdict_to_qapi(options, errp);
     if (opts == NULL) {
-- 
2.17.1




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] block/nfs: fix int overflow in nfs_client_open_qdict
  2020-12-09 12:17 [PATCH] block/nfs: fix int overflow in nfs_client_open_qdict Peter Lieven
@ 2020-12-10  9:00 ` Stefano Garzarella
  2020-12-15 16:03   ` Kevin Wolf
  0 siblings, 1 reply; 3+ messages in thread
From: Stefano Garzarella @ 2020-12-10  9:00 UTC (permalink / raw)
  To: Peter Lieven; +Cc: kwolf, mreitz, qemu-stable, qemu-block, qemu-devel

On Wed, Dec 09, 2020 at 01:17:35PM +0100, Peter Lieven wrote:
>nfs_client_open returns the file size in sectors. This effectively
>makes it impossible to open files larger than 1TB.
>
>Fixes: a1a42af422d46812f1f0cebe6b230c20409a3731
>Cc: qemu-stable@nongnu.org
>Signed-off-by: Peter Lieven <pl@kamp.de>
>---
> block/nfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

The issue seems to be pre-existing to the commit 
a1a42af422d46812f1f0cebe6b230c20409a3731, but of course that commit 
touched this code and this patch would not apply before, so it seems 
okay to me:

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>

Thanks,
Stefano

>
>diff --git a/block/nfs.c b/block/nfs.c
>index 77905f516d..8c1968bb41 100644
>--- a/block/nfs.c
>+++ b/block/nfs.c
>@@ -592,7 +592,7 @@ static int64_t nfs_client_open_qdict(NFSClient *client, QDict *options,
>                                      int flags, int open_flags, Error **errp)
> {
>     BlockdevOptionsNfs *opts;
>-    int ret;
>+    int64_t ret;
>
>     opts = nfs_options_qdict_to_qapi(options, errp);
>     if (opts == NULL) {
>-- 
>2.17.1
>
>
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] block/nfs: fix int overflow in nfs_client_open_qdict
  2020-12-10  9:00 ` Stefano Garzarella
@ 2020-12-15 16:03   ` Kevin Wolf
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Wolf @ 2020-12-15 16:03 UTC (permalink / raw)
  To: Stefano Garzarella
  Cc: mreitz, Peter Lieven, qemu-stable, qemu-block, qemu-devel

Am 10.12.2020 um 10:00 hat Stefano Garzarella geschrieben:
> On Wed, Dec 09, 2020 at 01:17:35PM +0100, Peter Lieven wrote:
> > nfs_client_open returns the file size in sectors. This effectively
> > makes it impossible to open files larger than 1TB.
> > 
> > Fixes: a1a42af422d46812f1f0cebe6b230c20409a3731
> > Cc: qemu-stable@nongnu.org
> > Signed-off-by: Peter Lieven <pl@kamp.de>
> > ---
> > block/nfs.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> The issue seems to be pre-existing to the commit
> a1a42af422d46812f1f0cebe6b230c20409a3731, but of course that commit touched
> this code and this patch would not apply before, so it seems okay to me:

I think it's commit c22a0345, which is the one right before a1a42af4.
I'll update the commit message accordingly.

> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>

Thanks, applied to the block branch.

Kevin



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-15 16:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-09 12:17 [PATCH] block/nfs: fix int overflow in nfs_client_open_qdict Peter Lieven
2020-12-10  9:00 ` Stefano Garzarella
2020-12-15 16:03   ` Kevin Wolf

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.