dlmopen glib2.0 crashed in g_variant_lookup_value

Bug #1763591 reported by bin on 2018-04-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glib2.0 (Ubuntu)
Undecided
Unassigned

Bug Description

when dlmopen glib2.0 and the program is linked with pthread, glib2.0 crashed in g_variant_lookup_value when dlmopen with
LM_ID_NEWLM

following is the poc:

#define _GNU_SOURCE
#include <dlfcn.h>
#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>

int main(int argc, char*argv[])
{
  char buf[4096] = {0};
  pthread_attr_t attr;

  pthread_attr_init(&attr);
  snprintf(buf, sizeof(buf), "/lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2");
  dlmopen(-1, buf, RTLD_NOW|RTLD_LOCAL);
  return 0;
}

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers