All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fs: ntfs3: fix Using uninitialized value n when calling indx_read
@ 2022-04-10  6:09 chinayanlei2002
  2022-04-20 17:50 ` Kari Argillander
  0 siblings, 1 reply; 4+ messages in thread
From: chinayanlei2002 @ 2022-04-10  6:09 UTC (permalink / raw)
  To: almaz.alexandrovich; +Cc: ntfs3, Yan Lei

From: Yan Lei <yan_lei@dahuatech.com>

Signed-off-by: Yan Lei <yan_lei@dahuatech.com>
---
 fs/ntfs3/index.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c
index 6f81e3a49..76ebea253 100644
--- a/fs/ntfs3/index.c
+++ b/fs/ntfs3/index.c
@@ -1994,7 +1994,7 @@ static int indx_free_children(struct ntfs_index *indx, struct ntfs_inode *ni,
 			      const struct NTFS_DE *e, bool trim)
 {
 	int err;
-	struct indx_node *n;
+	struct indx_node *n = NULL;
 	struct INDEX_HDR *hdr;
 	CLST vbn = de_get_vbn(e);
 	size_t i;
-- 
2.30.0


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

* Re: [PATCH] fs: ntfs3: fix Using uninitialized value n when calling indx_read
  2022-04-10  6:09 [PATCH] fs: ntfs3: fix Using uninitialized value n when calling indx_read chinayanlei2002
@ 2022-04-20 17:50 ` Kari Argillander
       [not found]   ` <6a8bea15.34ed.1805067b0fb.Coremail.chinayanlei2002@163.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Kari Argillander @ 2022-04-20 17:50 UTC (permalink / raw)
  To: chinayanlei2002, almaz.alexandrovich; +Cc: ntfs3, Yan Lei

This patch is sended from address chinayanlei2002@163.com you need to 
send it from yan_lei@dahuatech.com this was probably mistake?

Also please write commit message. Always good to write how did you spot 
this and what message some analyzer showed to you. This way everyone 
else will can verify and maybe even learn to use new tools. This also 
looks like it really fix something so this needs fix tag so it can be 
easily back ported to stable.

On 10.4.2022 9.09, chinayanlei2002@163.com wrote:
> From: Yan Lei <yan_lei@dahuatech.com>
> 
> Signed-off-by: Yan Lei <yan_lei@dahuatech.com>
> ---
>   fs/ntfs3/index.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c
> index 6f81e3a49..76ebea253 100644
> --- a/fs/ntfs3/index.c
> +++ b/fs/ntfs3/index.c
> @@ -1994,7 +1994,7 @@ static int indx_free_children(struct ntfs_index *indx, struct ntfs_inode *ni,
>   			      const struct NTFS_DE *e, bool trim)
>   {
>   	int err;
> -	struct indx_node *n;
> +	struct indx_node *n = NULL;
>   	struct INDEX_HDR *hdr;
>   	CLST vbn = de_get_vbn(e);
>   	size_t i;

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

* Re: [PATCH] fs: ntfs3: fix Using uninitialized value n when calling indx_read
       [not found]   ` <6a8bea15.34ed.1805067b0fb.Coremail.chinayanlei2002@163.com>
@ 2022-04-22  8:51     ` Kari Argillander
  2022-06-09 16:26     ` Konstantin Komarov
  1 sibling, 0 replies; 4+ messages in thread
From: Kari Argillander @ 2022-04-22  8:51 UTC (permalink / raw)
  To: yan; +Cc: almaz.alexandrovich, ntfs3, Yan Lei

Do not top post.

On 22.4.2022 11.33, yan wrote:
> 
>     It's not a mistake, I can't send patchs with my company's email due 
> to some security issues。

Then patch cannot be accepted. If you tag patch with email which does
not work how do people message to you if needed. Also how we can know
that it is your email if you event can't use it. That company security
policy goes too far if you can't even use your email address.

>     The CWE bug were detected by a static code scanning tool called 
> CodeS of my company(I don't kown its real name).
>     The CodeS reports:
>     Use of an uninitialized variable(CWE-457)
>     Using uninitialized value "n" when calling indx_read.
> 
>     commit messages is as below:
>     This CWE bug were detected by a static code scanning tool,
>     Fix using unitialized value n when calling indx_read

You need to send v2.

> At 2022-04-21 01:50:27, "Kari Argillander" <kari.argillander@gmail.com> wrote:
>>This patch is sended from address chinayanlei2002@163.com you need to 
>>send it from yan_lei@dahuatech.com this was probably mistake?
>>
>>Also please write commit message. Always good to write how did you spot 
>>this and what message some analyzer showed to you. This way everyone 
>>else will can verify and maybe even learn to use new tools. This also 
>>looks like it really fix something so this needs fix tag so it can be 
>>easily back ported to stable.
>>
>>On 10.4.2022 9.09, chinayanlei2002@163.com wrote:
>>> From: Yan Lei <yan_lei@dahuatech.com>
>>> 
>>> Signed-off-by: Yan Lei <yan_lei@dahuatech.com>
>>> ---
>>>   fs/ntfs3/index.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>> 
>>> diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c
>>> index 6f81e3a49..76ebea253 100644
>>> --- a/fs/ntfs3/index.c
>>> +++ b/fs/ntfs3/index.c
>>> @@ -1994,7 +1994,7 @@ static int indx_free_children(struct ntfs_index *indx, struct ntfs_inode *ni,
>>>   			      const struct NTFS_DE *e, bool trim)
>>>   {
>>>   	int err;
>>> -	struct indx_node *n;
>>> +	struct indx_node *n = NULL;
>>>   	struct INDEX_HDR *hdr;
>>>   	CLST vbn = de_get_vbn(e);
>>>   	size_t i;
> 
> 
> 

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

* Re: [PATCH] fs: ntfs3: fix Using uninitialized value n when calling indx_read
       [not found]   ` <6a8bea15.34ed.1805067b0fb.Coremail.chinayanlei2002@163.com>
  2022-04-22  8:51     ` Kari Argillander
@ 2022-06-09 16:26     ` Konstantin Komarov
  1 sibling, 0 replies; 4+ messages in thread
From: Konstantin Komarov @ 2022-06-09 16:26 UTC (permalink / raw)
  To: yan, Kari Argillander; +Cc: ntfs3, Yan Lei



On 4/22/22 11:33, yan wrote:
> 
> 
> 
>     It's not a mistake, I can't send patchs with my company's email due to some security issues。
> 
>     The CWE bug were detected by a static code scanning tool called CodeS of my company(I don't kown its real name).
>     The CodeS reports:
>     Use of an uninitialized variable(CWE-457)
>     Using uninitialized value "n" when calling indx_read.
> 
> 
>     commit messages is as below:
>     This CWE bug were detected by a static code scanning tool,
>     Fix using unitialized value n when calling indx_read
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> At 2022-04-21 01:50:27, "Kari Argillander" <kari.argillander@gmail.com> wrote:
>> This patch is sended from address chinayanlei2002@163.com you need to
>> send it from yan_lei@dahuatech.com this was probably mistake?
>>
>> Also please write commit message. Always good to write how did you spot
>> this and what message some analyzer showed to you. This way everyone
>> else will can verify and maybe even learn to use new tools. This also
>> looks like it really fix something so this needs fix tag so it can be
>> easily back ported to stable.
>>
>> On 10.4.2022 9.09, chinayanlei2002@163.com wrote:
>>> From: Yan Lei <yan_lei@dahuatech.com>
>>>
>>> Signed-off-by: Yan Lei <yan_lei@dahuatech.com>
>>> ---
>>>    fs/ntfs3/index.c | 2 +-
>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c
>>> index 6f81e3a49..76ebea253 100644
>>> --- a/fs/ntfs3/index.c
>>> +++ b/fs/ntfs3/index.c
>>> @@ -1994,7 +1994,7 @@ static int indx_free_children(struct ntfs_index *indx, struct ntfs_inode *ni,
>>>    			      const struct NTFS_DE *e, bool trim)
>>>    {
>>>    	int err;
>>> -	struct indx_node *n;
>>> +	struct indx_node *n = NULL;
>>>    	struct INDEX_HDR *hdr;
>>>    	CLST vbn = de_get_vbn(e);
>>>    	size_t i;

I've changed author email to chinayanlei2002@163.com and applied patch.
Thanks for catching this!

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

end of thread, other threads:[~2022-06-09 16:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-10  6:09 [PATCH] fs: ntfs3: fix Using uninitialized value n when calling indx_read chinayanlei2002
2022-04-20 17:50 ` Kari Argillander
     [not found]   ` <6a8bea15.34ed.1805067b0fb.Coremail.chinayanlei2002@163.com>
2022-04-22  8:51     ` Kari Argillander
2022-06-09 16:26     ` Konstantin Komarov

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.