AMQP message conversion can repeatedly disconnect AMQP 0-9-1 consumers
Summary
1. Summary
A producer that speaks AMQP 1.0 can publish a well formed message whose application properties contain a nested map with a key longer than 255 bytes. RabbitMQ accepts and stores this message. The failure happens later, on the consumer side: to deliver the message to an AMQP 0.9.1 co...
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| rabbitmqrabbitmq-server |
>= 4.3.0, < 4.3.7→ 4.3.7 |
4.3.7 |
| rabbitmqrabbitmq-server |
>= 4.2.0, < 4.2.12→ 4.2.12 |
4.2.12 |
| rabbitmqrabbitmq-server |
>= 4.1.0, < 4.1.17→ 4.1.17 |
4.1.17 |
Original description The description as published by the source.
1. Summary
A producer that speaks AMQP 1.0 can publish a well formed message whose application properties contain a nested map with a key longer than 255 bytes. RabbitMQ accepts and stores this message. The failure happens later, on the consumer side: to deliver the message to an AMQP 0.9.1 consumer, the broker converts the message into AMQP 0.9.1 properties, which produces a field table whose key cannot be represented in AMQP 0.9.1 (field table keys are shortstr, maximum 255 bytes). Encoding the delivery then raises content_properties_shortstr_overflow inside the connection's writer process, which tears the connection down. The consumer sees INTERNAL_ERROR (541) and never receives the message.
The message is not removed by the failed delivery. Unless an operator purges the queue or consumes the message with a different protocol, every subsequent AMQP 0.9.1 consumer that reaches it is disconnected in the same way, with no limit on the number of attempts. This turns a single small publish into a persistent denial of service for the AMQP 0.9.1 consumer population of that queue.
Two properties of the issue raise it above a queue level nuisance:
- The producer does not need any permission on the destination queue. Publish authorization is evaluated against the exchange, as documented, so a user whose only permission is
writeon a shared exchange can plant the message in any queue bound to that exchange, including queues owned by other users or tenants that the produ…
Source: GitHub Repository Security Advisories (Game のスタック) GitHub Advisory OSV
References
- GITHUB_REPO_ADVISORY rabbitmq/rabbitmq-server