Correctness bug: it didn’t do what the spec says it should do.
Fitness for purpose bug: it does what the spec says to do, but, with better knowledge, the spec isn’t what you actually want.
Edit: looks like this maps, respectively, to failing verification and failing validation. https://news.ycombinator.com/item?id=39359673
Edit2: My earlier comment on the different things that get called "bugs", before I was aware of this terminology: https://news.ycombinator.com/item?id=22259973
Correctness bug: it didn’t do what the spec says it should do.
Fitness for purpose bug: it does what the spec says to do, but, with better knowledge, the spec isn’t what you actually want.
Edit: looks like this maps, respectively, to failing verification and failing validation. https://news.ycombinator.com/item?id=39359673
Edit2: My earlier comment on the different things that get called "bugs", before I was aware of this terminology: https://news.ycombinator.com/item?id=22259973