Skip to content

erlang: fix PKG_CPE_ID escaping for apk ADB format#29512

Merged
commodo merged 1 commit into
openwrt:masterfrom
commodo:fix-erlang-cpe-id
May 24, 2026
Merged

erlang: fix PKG_CPE_ID escaping for apk ADB format#29512
commodo merged 1 commit into
openwrt:masterfrom
commodo:fix-erlang-cpe-id

Conversation

@commodo
Copy link
Copy Markdown
Contributor

@commodo commodo commented May 22, 2026

📦 Package Details

Maintainer: me

Description:

apk's ADB binary package format rejects both the backslash-escape and the percent-encoding variants of the previous CPE id:

cpe:/a:erlang:erlang/otp ERROR: info field 'tags' has invalid value
cpe:/a:erlang:erlang%2Fotp ERROR: info field 'tags' has invalid value

apk's tag value parser only accepts a restricted alphabet for ADB package format and neither '' nor '%' make the cut. The result is that the package never produces an .apk.

Drop the '/otp' suffix entirely and use cpe:/a:erlang:erlang, which matches the higher-level Erlang CPE entry. cve scanners that walked the more specific erlang/otp entry will fall back to this one.

This effectively reverts the product portion of bfdf014 ("lang/erlang: fix PKG_CPE_ID"), which was correct against the NIST 2.3 string but incompatible with apk's tag parser.

🧪 Run Testing Details

  • OpenWrt Version:
  • OpenWrt Target/Subtarget:
  • OpenWrt Device:

✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

apk's ADB binary package format rejects both the backslash-escape and
the percent-encoding variants of the previous CPE id:

  cpe:/a:erlang:erlang\/otp     ERROR: info field 'tags' has invalid value
  cpe:/a:erlang:erlang%2Fotp    ERROR: info field 'tags' has invalid value

apk's tag value parser only accepts a restricted alphabet for ADB
package format and neither '\' nor '%' make the cut. The result is
that the package never produces an .apk.

Drop the '/otp' suffix entirely and use cpe:/a:erlang:erlang, which
matches the higher-level Erlang CPE entry. cve scanners that walked
the more specific erlang\/otp entry will fall back to this one.

This effectively reverts the product portion of bfdf014 ("lang/erlang:
fix PKG_CPE_ID"), which was correct against the NIST 2.3 string but
incompatible with apk's tag parser.

Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
@commodo commodo merged commit c5af5e0 into openwrt:master May 24, 2026
12 checks passed
@commodo commodo deleted the fix-erlang-cpe-id branch May 24, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant