* [PATCH] fsinfo: Fix off-by-one bug
@ 2018-07-16 22:03 Gustavo A. R. Silva
2018-07-16 22:09 ` Gustavo A. R. Silva
0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2018-07-16 22:03 UTC (permalink / raw)
To: David Howells, Alexander Viro
Cc: linux-fsdevel, linux-kernel, Gustavo A. R. Silva
The current code reads one element beyond the end of the
fsinfo_buffer_sizes array.
Fixes: 4e635f61dd55 ("fsinfo: Add a system call to allow querying of filesystem information")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
fs/statfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/statfs.c b/fs/statfs.c
index 3b8e2700..2a28581 100644
--- a/fs/statfs.c
+++ b/fs/statfs.c
@@ -791,7 +791,7 @@ SYSCALL_DEFINE5(fsinfo,
params.Mth = user_params.Mth;
} else {
params.at_flags = 0;
- params.request = fsinfo_attr_statfs;
+ params.request = fsinfo_attr_statfs - 1;
params.Nth = 0;
params.Mth = 0;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fsinfo: Fix off-by-one bug
2018-07-16 22:03 [PATCH] fsinfo: Fix off-by-one bug Gustavo A. R. Silva
@ 2018-07-16 22:09 ` Gustavo A. R. Silva
0 siblings, 0 replies; 2+ messages in thread
From: Gustavo A. R. Silva @ 2018-07-16 22:09 UTC (permalink / raw)
To: David Howells, Alexander Viro; +Cc: linux-fsdevel, linux-kernel
Hi,
Please, drop this patch.
Sorry, I confused fsinfo_attr_statfs with fsinfo_attr__nr.
Thanks
--
Gustavo
On 07/16/2018 05:03 PM, Gustavo A. R. Silva wrote:
> The current code reads one element beyond the end of the
> fsinfo_buffer_sizes array.
>
> Fixes: 4e635f61dd55 ("fsinfo: Add a system call to allow querying of filesystem information")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> fs/statfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/statfs.c b/fs/statfs.c
> index 3b8e2700..2a28581 100644
> --- a/fs/statfs.c
> +++ b/fs/statfs.c
> @@ -791,7 +791,7 @@ SYSCALL_DEFINE5(fsinfo,
> params.Mth = user_params.Mth;
> } else {
> params.at_flags = 0;
> - params.request = fsinfo_attr_statfs;
> + params.request = fsinfo_attr_statfs - 1;
> params.Nth = 0;
> params.Mth = 0;
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-16 22:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-16 22:03 [PATCH] fsinfo: Fix off-by-one bug Gustavo A. R. Silva
2018-07-16 22:09 ` Gustavo A. R. Silva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).