GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Notices by Jann Horn (jann@infosec.exchange)

  1. Embed this notice
    Jann Horn (jann@infosec.exchange)'s status on Thursday, 03-Jul-2025 08:49:50 JST Jann Horn Jann Horn
    • ✧✦Catherine✦✧

    @dysfun @whitequark why is this a problem? as long as you have virtual memory, you pay something like up to 4093 bytes of data memory more than you need, plus some inefficiency of TLBs and page tables?

    In conversation about 2 days ago from infosec.exchange permalink
  2. Embed this notice
    Jann Horn (jann@infosec.exchange)'s status on Thursday, 03-Jul-2025 07:49:55 JST Jann Horn Jann Horn
    in reply to
    • ✧✦Catherine✦✧

    @whitequark compiler function attribute that teaches the compiler to lazily copy the stack after setjmp() has been called, so you basically have one active stack pointer and one stack pointer for saving old stack contents, and every callee of such a function, immediately after the call returns, backs up the current state of the now-active frame into memory referenced by the setjmp buffer

    In conversation about 2 days ago from infosec.exchange permalink
  3. Embed this notice
    Jann Horn (jann@infosec.exchange)'s status on Friday, 02-May-2025 02:13:43 JST Jann Horn Jann Horn

    Pretty far up the list of things I find terrible about Linux development is how emailed patches often have no clear machine-readably-specified commit they should apply to which is available in git - so it takes some manual effort to figure out how to locally apply them so that I can look at the entire codebase with the patches applied.

    Looking at a complex patch series with just 3 lines of context would be a really bad idea...

    In conversation about 2 months ago from infosec.exchange permalink
  4. Embed this notice
    Jann Horn (jann@infosec.exchange)'s status on Thursday, 01-May-2025 21:27:23 JST Jann Horn Jann Horn
    in reply to
    • ✧✦Catherine✦✧

    @whitequark is the GPU part of a CPU that enforces a combined TDP limit or are those things completely separate?

    In conversation about 2 months ago from gnusocial.jp permalink
  5. Embed this notice
    Jann Horn (jann@infosec.exchange)'s status on Thursday, 01-May-2025 21:23:37 JST Jann Horn Jann Horn
    in reply to
    • ✧✦Catherine✦✧

    @whitequark does one of the two implementations involve more thread switches, where you have lots of "thread A wakes thread B, then thread A goes to sleep"? AFAIK the kernel already can't handle those particularly well (https://youtu.be/KXuZi9aeGTw?t=611), and I imagine adding more noise to the scheduler could make things worse?

    In conversation about 2 months ago from infosec.exchange permalink

    Attachments

    1. User-level threads....... with threads. - Paul Turner - Google
      from Linux Plumbers Conference
      "Multi-threaded programming is hard. Synchronous interfaces can help, but typically require lighter-weight representation of concurrency than a thread to im...
  6. Embed this notice
    Jann Horn (jann@infosec.exchange)'s status on Wednesday, 02-Apr-2025 01:26:50 JST Jann Horn Jann Horn

    fun Linux fact: because MAP_SHARED|MAP_ANONYMOUS is actually a file-backed mapping under the hood, unmapping part of such a mapping does not discard the data stored in that part:

    $ cat mremap.c
    #define _GNU_SOURCE
    #include <err.h>
    #include <stdio.h>
    #include <sys/mman.h>
    int main(void) {
    char *p = mmap(NULL, 0x2000, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0);
    if (p == MAP_FAILED) err(1, "mmap");
    p[0x1000] = 'X';
    if (munmap(p+0x1000, 0x1000)) err(1, "munmap");
    // that 'X' we just wrote... is it gone?
    // nope, let's bring it back!
    p = mremap(p, 0x1000, 0x2000, MREMAP_MAYMOVE);
    if (p == MAP_FAILED) err(1, "mremap");
    printf("p[0x1000]='%c'\n", p[0x1000]);
    }
    $ gcc -o mremap mremap.c
    $ ./mremap
    p[0x1000]='X'
    $
    In conversation about 3 months ago from infosec.exchange permalink
  7. Embed this notice
    Jann Horn (jann@infosec.exchange)'s status on Saturday, 29-Mar-2025 07:18:57 JST Jann Horn Jann Horn

    Wow, __builtin_dump_struct is an amazing clang feature, how did I never hear about this before?

    $ cat test.c
    #include <stdio.h>

    struct nested {
    int n;
    };
    struct foo {
    int member_a;
    unsigned long member_b;
    char *str;
    void *ptr;
    struct nested nested;
    };

    int main(void) {
    struct foo f = {
    .member_a = 123,
    .member_b = 0x4141414141414141,
    .str = "foobar",
    .ptr = &f,
    .nested = {.n = 42}
    };
    __builtin_dump_struct(&f, printf);
    }
    $ clang -o test test.c && ./test
    struct foo {
    int member_a = 123
    unsigned long member_b = 4702111234474983745
    char * str = "foobar"
    void * ptr = 0x7fff1df41b78
    struct nested nested = {
    int n = 42
    }
    }

    The original version of this feature was introduced back in 2018 (though it was reimplemented since in 2022).

    In conversation about 3 months ago from infosec.exchange permalink
  8. Embed this notice
    Jann Horn (jann@infosec.exchange)'s status on Monday, 23-Sep-2024 12:11:22 JST Jann Horn Jann Horn
    in reply to
    • Alan Coopersmith

    @alanc aah, and I guess that also means it's safe if the compiler optimizes malloc(0) into NULL when the libc doesn't do that, only the other direction would break stuff...

    In conversation about 9 months ago from infosec.exchange permalink
  9. Embed this notice
    Jann Horn (jann@infosec.exchange)'s status on Monday, 23-Sep-2024 12:11:03 JST Jann Horn Jann Horn
    in reply to
    • Alan Coopersmith

    @alanc trying to determine at build time if malloc can return NULL seems kinda unsafe anyway? like, what if the same kind of compiler optimization also applies to the code that uses the macro, or if an update to the libc changes this behavior?

    In conversation about 9 months ago from infosec.exchange permalink
  10. Embed this notice
    Jann Horn (jann@infosec.exchange)'s status on Saturday, 07-Sep-2024 09:59:12 JST Jann Horn Jann Horn

    I added code to Linux to help KASAN detect specific types of UAFs more reliably (https://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git/commit/?h=slab/for-6.12/rcu_barriers&id=b8c8ba73c68bb3c3e9dad22f488b86c540c839f9), it's been in the linux-next integration tree for, I don't know, a month or so maybe (though it's not in the mainline tree yet), and still there are zero hits on LKML of bugs caught where the stack trace involves my detection...
    It's nice that there apparently aren't a lot of easy-to-find bugs of this type around but it's also a little disappointing to not immediately get some nice results from my work...

    In conversation about 10 months ago from infosec.exchange permalink

    Attachments

    1. Domain not in remote thumbnail source whitelist: git.kernel.org
      slub: Introduce CONFIG_SLUB_RCU_DEBUG - kernel/git/vbabka/slab.git - The slab kernel tree
  11. Embed this notice
    Jann Horn (jann@infosec.exchange)'s status on Wednesday, 13-Sep-2023 01:43:39 JST Jann Horn Jann Horn
    in reply to
    • warthog9

    @warthog9 what is the issue with gmail? is their SMTP dialog slower than other mail servers' or something like that?

    In conversation Wednesday, 13-Sep-2023 01:43:39 JST from infosec.exchange permalink

User actions

    Jann Horn

    Jann Horn

    human borrow checker (but logic bugs are best bugs).works at Google Project Zero.The density of logic bugs (compared to memory corruption bugs) goes down as the privilege differential between attacker context and target context goes up.

    Tags
    • (None)

    Following 0

      Followers 0

        Groups 0

          Statistics

          User ID
          171708
          Member since
          12 Sep 2023
          Notices
          11
          Daily average
          0

          Feeds

          • Atom
          • Help
          • About
          • FAQ
          • TOS
          • Privacy
          • Source
          • Version
          • Contact

          GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

          Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.