public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [patch] NetworkPkg: Fix assert issue in iSCSI driver
@ 2016-08-01  8:38 Zhang Lubo
  2016-08-01  8:53 ` Ye, Ting
  2016-08-01  8:59 ` Fu, Siyuan
  0 siblings, 2 replies; 3+ messages in thread
From: Zhang Lubo @ 2016-08-01  8:38 UTC (permalink / raw)
  To: edk2-devel; +Cc: Fu Siyuan, Ye Ting, Wu Jiaxin

The bug is caused by using already freed memory.
If there is already an attempt and execute
'reconnect -r' command, all the AttemptConfig structure
will be freed, but the mCallbackInfo->Current is not
configured as null and this pointer will be used again in
IScsiFormExtractConfig.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
---
 NetworkPkg/IScsiDxe/IScsiMisc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c b/NetworkPkg/IScsiDxe/IScsiMisc.c
index deebf5d..a39c268 100644
--- a/NetworkPkg/IScsiDxe/IScsiMisc.c
+++ b/NetworkPkg/IScsiDxe/IScsiMisc.c
@@ -898,10 +898,12 @@ IScsiCleanDriverData (
 
 EXIT:
 
   gBS->CloseEvent (Private->ExitBootServiceEvent);
 
+  mCallbackInfo->Current = NULL;
+
   FreePool (Private);
   return Status;
 }
 
 /**
-- 
1.9.5.msysgit.1



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

* Re: [patch] NetworkPkg: Fix assert issue in iSCSI driver
  2016-08-01  8:38 [patch] NetworkPkg: Fix assert issue in iSCSI driver Zhang Lubo
@ 2016-08-01  8:53 ` Ye, Ting
  2016-08-01  8:59 ` Fu, Siyuan
  1 sibling, 0 replies; 3+ messages in thread
From: Ye, Ting @ 2016-08-01  8:53 UTC (permalink / raw)
  To: Zhang, Lubo, edk2-devel@lists.01.org; +Cc: Fu, Siyuan, Wu, Jiaxin

Reviewed-by: Ye Ting <ting.ye@intel.com> 

-----Original Message-----
From: Zhang, Lubo 
Sent: Monday, August 01, 2016 4:38 PM
To: edk2-devel@lists.01.org
Cc: Fu, Siyuan <siyuan.fu@intel.com>; Ye, Ting <ting.ye@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>
Subject: [patch] NetworkPkg: Fix assert issue in iSCSI driver

The bug is caused by using already freed memory.
If there is already an attempt and execute 'reconnect -r' command, all the AttemptConfig structure will be freed, but the mCallbackInfo->Current is not configured as null and this pointer will be used again in IScsiFormExtractConfig.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
---
 NetworkPkg/IScsiDxe/IScsiMisc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c b/NetworkPkg/IScsiDxe/IScsiMisc.c index deebf5d..a39c268 100644
--- a/NetworkPkg/IScsiDxe/IScsiMisc.c
+++ b/NetworkPkg/IScsiDxe/IScsiMisc.c
@@ -898,10 +898,12 @@ IScsiCleanDriverData (
 
 EXIT:
 
   gBS->CloseEvent (Private->ExitBootServiceEvent);
 
+  mCallbackInfo->Current = NULL;
+
   FreePool (Private);
   return Status;
 }
 
 /**
--
1.9.5.msysgit.1



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

* Re: [patch] NetworkPkg: Fix assert issue in iSCSI driver
  2016-08-01  8:38 [patch] NetworkPkg: Fix assert issue in iSCSI driver Zhang Lubo
  2016-08-01  8:53 ` Ye, Ting
@ 2016-08-01  8:59 ` Fu, Siyuan
  1 sibling, 0 replies; 3+ messages in thread
From: Fu, Siyuan @ 2016-08-01  8:59 UTC (permalink / raw)
  To: Zhang, Lubo, edk2-devel@lists.01.org; +Cc: Ye, Ting, Wu, Jiaxin

Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>



> -----Original Message-----
> From: Zhang, Lubo
> Sent: Monday, August 1, 2016 4:38 PM
> To: edk2-devel@lists.01.org
> Cc: Fu, Siyuan <siyuan.fu@intel.com>; Ye, Ting <ting.ye@intel.com>; Wu,
> Jiaxin <jiaxin.wu@intel.com>
> Subject: [patch] NetworkPkg: Fix assert issue in iSCSI driver
> 
> The bug is caused by using already freed memory.
> If there is already an attempt and execute
> 'reconnect -r' command, all the AttemptConfig structure
> will be freed, but the mCallbackInfo->Current is not
> configured as null and this pointer will be used again in
> IScsiFormExtractConfig.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
> Cc: Fu Siyuan <siyuan.fu@intel.com>
> Cc: Ye Ting <ting.ye@intel.com>
> Cc: Wu Jiaxin <jiaxin.wu@intel.com>
> ---
>  NetworkPkg/IScsiDxe/IScsiMisc.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c
> b/NetworkPkg/IScsiDxe/IScsiMisc.c
> index deebf5d..a39c268 100644
> --- a/NetworkPkg/IScsiDxe/IScsiMisc.c
> +++ b/NetworkPkg/IScsiDxe/IScsiMisc.c
> @@ -898,10 +898,12 @@ IScsiCleanDriverData (
> 
>  EXIT:
> 
>    gBS->CloseEvent (Private->ExitBootServiceEvent);
> 
> +  mCallbackInfo->Current = NULL;
> +
>    FreePool (Private);
>    return Status;
>  }
> 
>  /**
> --
> 1.9.5.msysgit.1



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

end of thread, other threads:[~2016-08-01  8:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-01  8:38 [patch] NetworkPkg: Fix assert issue in iSCSI driver Zhang Lubo
2016-08-01  8:53 ` Ye, Ting
2016-08-01  8:59 ` Fu, Siyuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox