Skip to content

Instantly share code, notes, and snippets.

@Doy-lee
Doy-lee / error_handling_using_a_sink.md
Last active February 11, 2024 11:04
Error handling using a 'sink'

Error Handling using a 'sink'

Error sinks are a way of accumulating errors from API calls related or unrelated into 1 unified error handling pattern. The implementation of a sink requires 2 fundamental design constraints on the APIs supporting this pattern.

  1. Pipelining of errors

    Errors emitted over the course of several API calls are accumulated into a sink which save the error code and message of the first error encountered

Complete stuff:
https://xmonader.github.io/letsbuildacompiler-pretty/
Lexers + DFAs:
https://gist.github.com/pervognsen/218ea17743e1442e59bb60d29b1aa725
Parsing:
https://eli.thegreenplace.net/2012/08/02/parsing-expressions-by-precedence-climbing
Backend:
@MaxBWMinRTT
MaxBWMinRTT / writeup.md
Last active November 3, 2023 08:44
Some quick notes about the CVE-2023-3079(V8 type confusion), no PoC yet.

Some quick notes about the CVE-2023-3079(V8 type confusion), no PoC yet.

Official patch: https://chromium-review.googlesource.com/c/v8/v8/+/4584248

image

Patch come from KeyedStoreIC::StoreElementHandler(), it returns fast path code(Turbofan builtin) for keyed store depends on "receiver_map" and "store_mode". Based on the content of this function is all about element STORE, I personally believe that this is an OOB writes vulnerability.

If we divide the PoC exploration into two parts based on this func, they are:

@pervognsen
pervognsen / rad.py
Last active January 18, 2024 02:30
# Reverse-mode automatic differentiation
import math
# d(-x) = -dx
def func_neg(x):
return -x, [-1]
# d(x + y) = dx + dy
def func_add(x, y):
@eligrey
eligrey / github-repo-exists.js.md
Last active January 5, 2024 07:10
GitHub private repository existence disclosure timing attack

eli submitted a report to GitHub.

Oct 1st, 2018

Description:

The X-Runtime-rack header leaks enough timing data to detect the existence of private repositories.

Steps To Reproduce: