Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Sat, 23 Jan 2021 06:47:00 +0000
From: Andrew Rogers <>
Subject: Potential DL_NOMMU_SUPPORT bug.


I was trying a DL_NOMMU_SUPPORT build so I could load binaries from the
sdcard on an android device. I managed to succeed but only after making a
mod which I later realised might apply beyond my application.

The mmap_fixed() function would return as if successful even when mmap()
call had failed

Hopefully the link and the patch below help.


diff -Naur musl-1.2.2-orig/ldso/dynlink.c musl-1.2.2-new/ldso/dynlink.c
--- musl-1.2.2-orig/ldso/dynlink.c 2021-01-15 02:26:00.000000000 +0000
+++ musl-1.2.2-new/ldso/dynlink.c 2021-01-23 06:26:26.861158169 +0000
@@ -581,7 +581,7 @@
  char *q;
  if (!no_map_fixed) {
  q = mmap(p, n, prot, flags|MAP_FIXED, fd, off);
- if (!DL_NOMMU_SUPPORT || q != MAP_FAILED || errno != EINVAL)
+ if (!DL_NOMMU_SUPPORT && q != MAP_FAILED && errno != EINVAL)
  return q;
  no_map_fixed = 1;

Content of type "text/html" skipped

View attachment "musl-DL_NOMMU_SUPPORT-dynlink.patch" of type "text/x-patch" (485 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.