{"id":21884032,"url":"https://github.com/leiless/xnu_printf_prec_panic","last_synced_at":"2026-05-17T08:37:24.455Z","repository":{"id":140255227,"uuid":"167643453","full_name":"leiless/xnu_printf_prec_panic","owner":"leiless","description":"A XNU kernel precision printf() C-string panic validation program","archived":false,"fork":false,"pushed_at":"2019-03-03T03:00:56.000Z","size":57,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-11T19:52:52.753Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leiless.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-26T03:02:10.000Z","updated_at":"2022-02-11T10:16:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"6e8312e2-9e28-4b49-9e30-be240797f959","html_url":"https://github.com/leiless/xnu_printf_prec_panic","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/leiless/xnu_printf_prec_panic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leiless%2Fxnu_printf_prec_panic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leiless%2Fxnu_printf_prec_panic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leiless%2Fxnu_printf_prec_panic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leiless%2Fxnu_printf_prec_panic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leiless","download_url":"https://codeload.github.com/leiless/xnu_printf_prec_panic/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leiless%2Fxnu_printf_prec_panic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33132031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T06:27:06.342Z","status":"ssl_error","status_checked_at":"2026-05-17T06:26:59.432Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-28T10:11:56.715Z","updated_at":"2026-05-17T08:37:24.439Z","avatar_url":"https://github.com/leiless.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## XNU kernel precision printf() C-string panic validation program\n\n### Prelude\n\nThis repository used as a bug validation program to verify XNU printf() panic bug with C-string precision modifier, i.e. `%[.precision]s`\n\nThis bug can be reproduce steadily in macOS which uses [log(1)](x-man-page://1/log) as its primary logging system\n\nNew [log(1)](x-man-page://1/log) logging system first adopted in macOS Sierra(10.12), currently this kernel panic bug affects macOS [10.12, 10.14.3(18D42)]\n\n### Compile \u0026 test\n\n```shell\n# Use `release' target for kext release build\n$ make [release]\n\n$ mkdir -p /var/tmp/t\n$ sudo cp -R xnu_printf_prec_panic.kext /var/tmp/t\n$ sudo kextload -v /var/tmp/t/xnu_printf_prec_panic.kext\n\n$ cd daemon\n# Use `release' target for user-space daemon release build\n$ make [release]\n# Run user-space test program\n$ ./daemon.out\n...\n\n# Check kext logs\n$ sudo dmesg | grep xnu_printf_prec_panic\n...\n```\n\n### Sample output\n\nPlease check text files under `test/` directory\n\n### Explanation\n\nPlease refers to [Tracking down a XNU printf() precision modifier panic bug](http://junkman.cn/p/19/01_xnu_printf_precision_panic.html)\n\n### *References*\n\n[printf - C++ Reference](http://www.cplusplus.com/reference/cstdio/printf)\n\n[printf, fprintf, sprintf,... - cppreference.com](https://en.cppreference.com/w/c/io/fprintf)\n\n[xnu/osfmk/kern/printf.c#printf()](http://xr.anadoxin.org/source/xref/macos-10.13.6-highsierra/xnu-4570.71.2/osfmk/kern/printf.c#853)\n\n[xnu/osfmk/device/subrs.c#strlcpy()](http://xr.anadoxin.org/source/xref/macos-10.13.6-highsierra/xnu-4570.71.2/osfmk/device/subrs.c#548)\n\n---\n\n*Created 190128*\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleiless%2Fxnu_printf_prec_panic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleiless%2Fxnu_printf_prec_panic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleiless%2Fxnu_printf_prec_panic/lists"}