Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addrTo_in_addr access invalid memory with old libnl (3.4.0) #30

Open
ppiao opened this issue Dec 20, 2024 · 0 comments
Open

addrTo_in_addr access invalid memory with old libnl (3.4.0) #30

ppiao opened this issue Dec 20, 2024 · 0 comments
Labels
bug Something isn't working new Issues that haven't been triaged yet

Comments

@ppiao
Copy link

ppiao commented Dec 20, 2024

Describe the bug

thom311/libnl@8d40d9e

before this commit netlink socket may return address with zero size.

bool addrTo_in_addr(struct nl_addr* ra, struct in_addr& addr)
{
   if (ra)
   {
      if (::nl_addr_get_family(ra) == AF_INET)
      {
         void* ba = ::nl_addr_get_binary_addr(ra);
         if (ba)
         {
            addr = *reinterpret_cast<struct in_addr*>(ba); // access invalid memory
            return true;
         }
      }
   }
   return false;
}

Describe the system
beegfs: master
libnl: libnl-route 3.4.0-1 ubuntu0.1

@ppiao ppiao added bug Something isn't working new Issues that haven't been triaged yet labels Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working new Issues that haven't been triaged yet
Projects
None yet
Development

No branches or pull requests

1 participant