Thijs Alkemade Profile picture
Sep 27 8 tweets 2 min read Read on X
We had a short look at the buffer overflow found by fuzzing `process_browse_data` to determine its exploitability. Conclusion: this bug alone won't give you RCE, or even an info leak.
It's an out-of-bounds read of 1 byte past the end of a stack buffer. In various places the following condition is used to determine whether to stop processing:

*c != '\"' && c < end

github.com/OpenPrinting/c…
This should be the other way around: currently, once c == end, it will still check if *c == '\"' first, reading 1 byte past the end of the packet buffer.
Can this leak anything important? The function will always bail if it reaches this condition, so at best it will introduce a (tiny) timing difference based on whether the first byte after the packet buffer is 0x22 or not. What is at that location will depend on the compiler.
For the i386, ARM64 and ARMHF Debian packages for cups-browsed, the stack location after it contains the stack canary, which would be very interesting to leak. However, on Linux the stack canary always starts with a NUL byte, so leaking the first byte is not useful.
In the AMD64 package, there's 8 bytes of padding between the end and the stack canary, which could contain uninitialised data, depending on the previous function that occupied this stack area.
This timing difference will be very, very hard to observe remotely (we're talking about skipping ~2 instructions), and it just indicates whether the value is 0x22 or something else. So as an information leak, this is not very useful. RCE with just this read is impossible.
However, it is a vulnerability and should be fixed, and it should be interpreted as a sign that there might be other parsing bugs, so further auditing/fuzzing is a good idea.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Thijs Alkemade

Thijs Alkemade Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @xnyhps

Jun 3, 2021
Some more details about this vulnerability: com.apple.AppStoreDaemon.StorePrivilegedTaskService is an XPC service embedded in AppStoreDaemon.framework. Any (sandboxed) application can load this framework and then communicate with this service.
It has a ServiceType of System, so this XPC service runs as root. This service appears to be used for performing privileged operations for App Store installs: moving files, changing xattrs adding receipts, etc.
It did not verify the application initiating the connection, so any application can connect and request it to perform these operations! There's one catch: the XPC service has a custom sandbox profile.
Read 9 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(