Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: php-win-ext/libxpm
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: winlibs/libxpm
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 6 commits
  • 14 files changed
  • 3 contributors

Commits on Oct 22, 2024

  1. Fix CVE-2022-46285: Infinite loop on unclosed comments

    When reading XPM images from a file with libXpm 3.5.14 or older, if a
    comment in the file is not closed (i.e. a C-style comment starts with
    "/*" and is missing the closing "*/"), the ParseComment() function will
    loop forever calling getc() to try to read the rest of the comment,
    failing to notice that it has returned EOF, which may cause a denial of
    service to the calling program.
    
    Reported-by: Marco Ivaldi <[email protected]>
    Signed-off-by: Alan Coopersmith <[email protected]>
    alanc authored and cmb69 committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    663b706 View commit details
    Browse the repository at this point in the history
  2. Fix CVE-2022-44617: Runaway loop with width of 0 and enormous height

    When reading XPM images from a file with libXpm 3.5.14 or older, if a
    image has a width of 0 and a very large height, the ParsePixels() function
    will loop over the entire height calling getc() and ungetc() repeatedly,
    or in some circumstances, may loop seemingly forever, which may cause a
    denial of service to the calling program when given a small crafted XPM
    file to parse.
    
    Closes: winlibs#2
    
    Reported-by: Martin Ettl <[email protected]>
    Signed-off-by: Alan Coopersmith <[email protected]>
    alanc authored and cmb69 committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    a497318 View commit details
    Browse the repository at this point in the history
  3. Prevent a double free in the error code path

    xpmParseDataAndCreate() calls XDestroyImage() in the error path.
    Reproducible with sxpm "zero-width.xpm", that file is in the test/
    directory.
    
    The same approach is needed in the bytes_per_line == 0 condition though
    here it just plugs a memory leak.
    
    Signed-off-by: Alan Coopersmith <[email protected]>
    mherrb authored and cmb69 committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    581af1b View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2024

  1. Add vs17 solution

    cmb69 committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    1856977 View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2024

  1. Fix CVE-2023-43788: Out of bounds read in XpmCreateXpmImageFromBuffer

    When the test case for CVE-2022-46285 was run with the Address Sanitizer
    enabled, it found an out-of-bounds read in ParseComment() when reading
    from a memory buffer instead of a file, as it continued to look for the
    closing comment marker past the end of the buffer.
    
    Signed-off-by: Alan Coopersmith <[email protected]>
    alanc authored and cmb69 committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    2652f0b View commit details
    Browse the repository at this point in the history
  2. Fix CVE-2023-43789: Out of bounds read on XPM with corrupted colormap

    Found with clang's libfuzzer
    
    Signed-off-by: Alan Coopersmith <[email protected]>
    alanc authored and cmb69 committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    8cbfcb3 View commit details
    Browse the repository at this point in the history
Loading