[PATCH] x86: Pass "%s" to i386_dis_printf as the format string

Project / Subsystem

binutils / x86

Date

2026-05-24

Proposer

"H.J. Lu" <hjl.tools@gmail.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

/10

Technical tradeoffs

  • Passing "%s" to i386_dis_printf ensures safe handling of input strings.
  • New tests added to the testsuite cover disassembly comments.

All attributes

project
binutils
subsystem
x86
patch_id
discussion_id
CAMe9rOoif-2+zZoR1=Vbr3pcGBoCnBhDW84Xy=pJ9agBvQUn6g@mail.gmail.com
source_type
public_inbox
title
[PATCH] x86: Pass "%s" to i386_dis_printf as the format string
headline
Pass "%s" to i386_dis_printf as the format string
tldr
The patch modifies the x86 disassembler to pass "%s" as the format string to `i386_dis_printf` to prevent format string vulnerabilities.
proposer
"H.J. Lu" <hjl.tools@gmail.com>
consensus
Proposed
outcome
proposed
sentiment_score
technical_tradeoffs
  • Passing "%s" to i386_dis_printf ensures safe handling of input strings.
  • New tests added to the testsuite cover disassembly comments.
series_id
series_role
standalone
series_parts
[]
tags
  • security
  • x86
  • disassembler
  • format string vulnerability
  • binutils
bugzilla_url
date
2026-05-24T00:00:00.000Z

[PATCH] x86: Pass "%s" to i386_dis_printf as the format string

This patch updates the x86 disassembler code to pass "%s" as the format string to the i386_dis_printf function. This change is intended to prevent potential format string vulnerabilities. The patch also includes testsuite updates with new tests (comments.d, comments.s, comments-intel.d) to ensure the proper generation of disassembly comments.