Tolkien (in his letter 110 to his Publisher) seems happy to admit that although several of the "Riddles in the Dark" were traditional (and were therefore adapted by him rather than being fully original works of fiction), all of the others were his own work and that none of them required any additional attribution since the authors were historical/ unknown:
110 From a letter to Allen & Unwin 20 September 1947
[Tolkien's American publishers, the Houghton Mifflin Co., applied to Allen & Unwin for permission to use several riddles from The Hobbit in
an anthology of poetry. Allen & Unwin suggested to Tolkien that 'the
riddles were taken from common folk lore and were not invented by
you'.]
As for the Riddles: they are 'all my own work' except for 'Thirty
White Horses' which is traditional, and 'No-legs'. The remainder,
though their style and method is that of old literary (but not
'folk-lore') riddles, have no models as far as I am aware, save only
the egg-riddle which is a reduction to a couplet (my own) of a longer
literary riddle which appears in some 'Nursery Rhyme' books, notably
American ones. So I feel that to try and use them without fee would be
about as just as walking off with somebody's chair because it was a
Chippendale copy, or drinking his wine because it was labelled
'port-type'. I feel also constrained to remark that 'Sun on the
Daisies' is not in verse (any more than 'No-legs') being but the
etymology of the word 'daisy', expressed in riddleform