[dm-devel] libmultipath: fix NULL dereference in get_be64

lixiaokeng lixiaokeng at huawei.com
Mon Feb 1 11:49:33 UTC 2021



On 2021/2/1 19:16, Martin Wilck wrote:
> I don't understand. All callers (uev_add_path(), cli_add_path(),
> check_path()) call pathinfo() first, which would return
> PATHINFO_SKIPPED if the path was blacklisted. How do you end up 
> in ev_add_path() with a blacklisted path?
> 
> And how is it possible that add_map_with_path(vecs, pp, 1) returns non-
> NULL and pp->mpp is NULL?

The sdb is a local disk, stack:

cli_add_path
   ->ev_add_path
      ->add_map_with_path
         ->adopt_paths
            ->pathinfo
               ->filter_property
               ->return PATHINFO_SKIPPED,
            ->pp->mpp is NULL and not be set
            ->return 0
      ->mpath_pr_event_handle
         ->get_be64 //pp->mpp is dereference

The multipath.conf show:
defaults {
        find_multipaths no
}

Here, my local disks can't pass filter_property. Why?

Regards,
Lixiaokeng





More information about the dm-devel mailing list