libmultipath: fix NULL dereference in get_be64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When find_multipaths is no and add local path by multiapthd,
the local path will be filtered by filter_property. The
pp->mpp is not set in adopt_paths. Then the pp->mpp will be
dereferenced in get_be6.

Here add check pp->mpp in ev_add_path.

Signed-off-by: Lixiaokeng <lixiaokeng@xxxxxxxxxx>
---
 multipathd/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/multipathd/main.c b/multipathd/main.c
index a4abbb2..8ad8bea 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1010,7 +1010,7 @@ rescan:
            return 0;
        }
        condlog(4,"%s: creating new map", pp->dev);
-       if ((mpp = add_map_with_path(vecs, pp, 1))) {
+       if ((mpp = add_map_with_path(vecs, pp, 1)) && pp->mpp) {
            mpp->action = ACT_CREATE;
            /*
             * We don't depend on ACT_CREATE, as domap will
-- 
1.8.3.1

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux